mirror of
https://github.com/home-assistant/core.git
synced 2025-08-10 16:15:08 +02:00
add total gas consumption sensors
This commit is contained in:
@@ -235,6 +235,34 @@ GLOBAL_SENSORS: tuple[ViCareSensorEntityDescription, ...] = (
|
|||||||
unit_getter=lambda api: api.getFuelCellGasConsumptionUnit(),
|
unit_getter=lambda api: api.getFuelCellGasConsumptionUnit(),
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
),
|
),
|
||||||
|
ViCareSensorEntityDescription(
|
||||||
|
key="gas_consumption_total_today",
|
||||||
|
translation_key="gas_consumption_total_today",
|
||||||
|
value_getter=lambda api: api.getGasConsumptionTotalToday(),
|
||||||
|
unit_getter=lambda api: api.getGasConsumptionUnit(),
|
||||||
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
|
),
|
||||||
|
ViCareSensorEntityDescription(
|
||||||
|
key="gas_consumption_total_this_week",
|
||||||
|
translation_key="gas_consumption_total_this_week",
|
||||||
|
value_getter=lambda api: api.getGasConsumptionTotalThisWeek(),
|
||||||
|
unit_getter=lambda api: api.getGasConsumptionUnit(),
|
||||||
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
|
),
|
||||||
|
ViCareSensorEntityDescription(
|
||||||
|
key="gas_consumption_total_this_month",
|
||||||
|
translation_key="gas_consumption_total_this_month",
|
||||||
|
value_getter=lambda api: api.getGasConsumptionTotalThisMonth(),
|
||||||
|
unit_getter=lambda api: api.getGasConsumptionUnit(),
|
||||||
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
|
),
|
||||||
|
ViCareSensorEntityDescription(
|
||||||
|
key="gas_consumption_total_this_year",
|
||||||
|
translation_key="gas_consumption_total_this_year",
|
||||||
|
value_getter=lambda api: api.getGasConsumptionTotalThisYear(),
|
||||||
|
unit_getter=lambda api: api.getGasConsumptionUnit(),
|
||||||
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
|
),
|
||||||
ViCareSensorEntityDescription(
|
ViCareSensorEntityDescription(
|
||||||
key="gas_summary_consumption_heating_currentday",
|
key="gas_summary_consumption_heating_currentday",
|
||||||
translation_key="gas_summary_consumption_heating_currentday",
|
translation_key="gas_summary_consumption_heating_currentday",
|
||||||
|
Reference in New Issue
Block a user