1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-08 17:49:37 +01:00

Remove uneeded check in whirlpool oven temperature sensors (#157997)

This commit is contained in:
Abílio Costa
2025-12-10 16:45:34 +00:00
committed by GitHub
parent 48f186368a
commit 6b8650c6d9
+2 -6
View File
@@ -244,9 +244,7 @@ OVEN_CAVITY_SENSORS: tuple[WhirlpoolOvenCavitySensorEntityDescription, ...] = (
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda oven, cavity: (
temp if (temp := oven.get_temp(cavity)) != 0 else None
),
value_fn=lambda oven, cavity: oven.get_temp(cavity),
),
WhirlpoolOvenCavitySensorEntityDescription(
key="oven_target_temperature",
@@ -254,9 +252,7 @@ OVEN_CAVITY_SENSORS: tuple[WhirlpoolOvenCavitySensorEntityDescription, ...] = (
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_fn=lambda oven, cavity: (
temp if (temp := oven.get_target_temp(cavity)) != 0 else None
),
value_fn=lambda oven, cavity: oven.get_target_temp(cavity),
),
)