Remove invalid device class in energyzero (#85690)
* Remove invalid device class in energyzero * Adjust tests
This commit is contained in:
parent
a575dfb5c3
commit
a2f6299fc1
2 changed files with 4 additions and 11 deletions
|
@ -44,7 +44,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
|||
key="current_hour_price",
|
||||
name="Current hour",
|
||||
service_type="today_gas",
|
||||
device_class=SensorDeviceClass.MONETARY,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfVolume.CUBIC_METERS}",
|
||||
value_fn=lambda data: data.gas_today.current_price if data.gas_today else None,
|
||||
|
@ -53,7 +52,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
|||
key="next_hour_price",
|
||||
name="Next hour",
|
||||
service_type="today_gas",
|
||||
device_class=SensorDeviceClass.MONETARY,
|
||||
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfVolume.CUBIC_METERS}",
|
||||
value_fn=lambda data: get_gas_price(data, 1),
|
||||
),
|
||||
|
@ -61,7 +59,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
|||
key="current_hour_price",
|
||||
name="Current hour",
|
||||
service_type="today_energy",
|
||||
device_class=SensorDeviceClass.MONETARY,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfEnergy.KILO_WATT_HOUR}",
|
||||
value_fn=lambda data: data.energy_today.current_price,
|
||||
|
@ -70,7 +67,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
|||
key="next_hour_price",
|
||||
name="Next hour",
|
||||
service_type="today_energy",
|
||||
device_class=SensorDeviceClass.MONETARY,
|
||||
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfEnergy.KILO_WATT_HOUR}",
|
||||
value_fn=lambda data: data.energy_today.price_at_time(
|
||||
data.energy_today.utcnow() + timedelta(hours=1)
|
||||
|
@ -80,7 +76,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
|||
key="average_price",
|
||||
name="Average - today",
|
||||
service_type="today_energy",
|
||||
device_class=SensorDeviceClass.MONETARY,
|
||||
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfEnergy.KILO_WATT_HOUR}",
|
||||
value_fn=lambda data: data.energy_today.average_price,
|
||||
),
|
||||
|
@ -88,7 +83,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
|||
key="max_price",
|
||||
name="Highest price - today",
|
||||
service_type="today_energy",
|
||||
device_class=SensorDeviceClass.MONETARY,
|
||||
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfEnergy.KILO_WATT_HOUR}",
|
||||
value_fn=lambda data: data.energy_today.extreme_prices[1],
|
||||
),
|
||||
|
@ -96,7 +90,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
|
|||
key="min_price",
|
||||
name="Lowest price - today",
|
||||
service_type="today_energy",
|
||||
device_class=SensorDeviceClass.MONETARY,
|
||||
native_unit_of_measurement=f"{CURRENCY_EURO}/{UnitOfEnergy.KILO_WATT_HOUR}",
|
||||
value_fn=lambda data: data.energy_today.extreme_prices[0],
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue