mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Fix tplink number platform to use intended BOX mode (#126397)
The NumberMode should be BOX as per the entity description but due to the missing dataclass decorator was resolving to NumberMode.AUTO.
This commit is contained in:
parent
24106114b4
commit
556deb4f77
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
import logging
|
import logging
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ from .entity import (
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class TPLinkNumberEntityDescription(
|
class TPLinkNumberEntityDescription(
|
||||||
NumberEntityDescription, TPLinkFeatureEntityDescription
|
NumberEntityDescription, TPLinkFeatureEntityDescription
|
||||||
):
|
):
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
'capabilities': dict({
|
'capabilities': dict({
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
@ -79,7 +79,7 @@
|
|||||||
'friendly_name': 'my_device Smooth off',
|
'friendly_name': 'my_device Smooth off',
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
@ -98,7 +98,7 @@
|
|||||||
'capabilities': dict({
|
'capabilities': dict({
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
@ -134,7 +134,7 @@
|
|||||||
'friendly_name': 'my_device Smooth on',
|
'friendly_name': 'my_device Smooth on',
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
@ -153,7 +153,7 @@
|
|||||||
'capabilities': dict({
|
'capabilities': dict({
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': -10,
|
'min': -10,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
@ -189,7 +189,7 @@
|
|||||||
'friendly_name': 'my_device Temperature offset',
|
'friendly_name': 'my_device Temperature offset',
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': -10,
|
'min': -10,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
@ -208,7 +208,7 @@
|
|||||||
'capabilities': dict({
|
'capabilities': dict({
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'config_entry_id': <ANY>,
|
'config_entry_id': <ANY>,
|
||||||
@ -244,7 +244,7 @@
|
|||||||
'friendly_name': 'my_device Turn off in',
|
'friendly_name': 'my_device Turn off in',
|
||||||
'max': 65536,
|
'max': 65536,
|
||||||
'min': 0,
|
'min': 0,
|
||||||
'mode': <NumberMode.AUTO: 'auto'>,
|
'mode': <NumberMode.BOX: 'box'>,
|
||||||
'step': 1.0,
|
'step': 1.0,
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user