Skip to content

Commit c852e13

Browse files
joostlekfrenck
authored andcommitted
Set unit of measurement for SmartThings oven setpoint (#140560)
1 parent 761be93 commit c852e13

File tree

6 files changed

+1325
-3
lines changed

6 files changed

+1325
-3
lines changed

homeassistant/components/smartthings/sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ class SmartThingsSensorEntityDescription(SensorEntityDescription):
572572
SmartThingsSensorEntityDescription(
573573
key=Attribute.OVEN_SETPOINT,
574574
translation_key="oven_setpoint",
575+
device_class=SensorDeviceClass.TEMPERATURE,
576+
native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,
577+
value_fn=lambda value: value if value != 0 else None,
575578
)
576579
]
577580
},

tests/components/smartthings/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def mock_smartthings() -> Generator[AsyncMock]:
109109
"da_wm_wm_000001_1",
110110
"da_rvc_normal_000001",
111111
"da_ks_microwave_0101x",
112+
"da_ks_range_0101x",
112113
"hue_color_temperature_bulb",
113114
"hue_rgbw_color_bulb",
114115
"c2c_shade",

0 commit comments

Comments
 (0)