From 6b8650c6d913d3d8a1b04873fbc96034d4151973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ab=C3=ADlio=20Costa?= Date: Wed, 10 Dec 2025 16:45:34 +0000 Subject: [PATCH] Remove uneeded check in whirlpool oven temperature sensors (#157997) --- homeassistant/components/whirlpool/sensor.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/whirlpool/sensor.py b/homeassistant/components/whirlpool/sensor.py index 91705428945..04dd3d2c036 100644 --- a/homeassistant/components/whirlpool/sensor.py +++ b/homeassistant/components/whirlpool/sensor.py @@ -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), ), )