Use TEMPERATURE_DELTA for tplink temperature offset (#155239)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
Teemu R.
2025-10-31 14:19:28 +01:00
committed by GitHub
parent 10d2e38315
commit 1ddb39f6d0
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ from kasa import Device, Feature
from homeassistant.components.number import (
DOMAIN as NUMBER_DOMAIN,
NumberDeviceClass,
NumberEntity,
NumberEntityDescription,
NumberMode,
@@ -56,6 +57,7 @@ NUMBER_DESCRIPTIONS: Final = (
TPLinkNumberEntityDescription(
key="temperature_offset",
mode=NumberMode.BOX,
device_class=NumberDeviceClass.TEMPERATURE_DELTA,
),
TPLinkNumberEntityDescription(
key="pan_step",

View File

@@ -347,7 +347,7 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_device_class': <NumberDeviceClass.TEMPERATURE_DELTA: 'temperature_delta'>,
'original_icon': None,
'original_name': 'Temperature offset',
'platform': 'tplink',
@@ -362,6 +362,7 @@
# name: test_states[number.my_device_temperature_offset-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'temperature_delta',
'friendly_name': 'my_device Temperature offset',
'max': 10,
'min': -10,