Allowing for TOON cost sensors to work with Energy (#74315)

pull/74408/head
Thanasis 2022-07-04 14:11:36 +03:00 committed by GitHub
parent 07f677e9e8
commit 227d8b69a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -182,6 +182,8 @@ SENSOR_ENTITIES: tuple[ToonSensorEntityDescription, ...] = (
name="Gas Cost Today",
section="gas_usage",
measurement="day_cost",
device_class=SensorDeviceClass.MONETARY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=CURRENCY_EUR,
icon="mdi:gas-cylinder",
cls=ToonGasMeterDeviceSensor,
@ -230,6 +232,8 @@ SENSOR_ENTITIES: tuple[ToonSensorEntityDescription, ...] = (
name="Energy Cost Today",
section="power_usage",
measurement="day_cost",
device_class=SensorDeviceClass.MONETARY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=CURRENCY_EUR,
icon="mdi:power-plug",
cls=ToonElectricityMeterDeviceSensor,
@ -350,6 +354,8 @@ SENSOR_ENTITIES: tuple[ToonSensorEntityDescription, ...] = (
name="Water Cost Today",
section="water_usage",
measurement="day_cost",
device_class=SensorDeviceClass.MONETARY,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=CURRENCY_EUR,
icon="mdi:water-pump",
entity_registry_enabled_default=False,