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:
Steven B. 2024-09-21 18:03:51 +01:00 committed by GitHub
parent 24106114b4
commit 556deb4f77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View File

@ -2,6 +2,7 @@
from __future__ import annotations
from dataclasses import dataclass
import logging
from typing import Final
@ -26,6 +27,7 @@ from .entity import (
_LOGGER = logging.getLogger(__name__)
@dataclass(frozen=True, kw_only=True)
class TPLinkNumberEntityDescription(
NumberEntityDescription, TPLinkFeatureEntityDescription
):

View File

@ -43,7 +43,7 @@
'capabilities': dict({
'max': 65536,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'config_entry_id': <ANY>,
@ -79,7 +79,7 @@
'friendly_name': 'my_device Smooth off',
'max': 65536,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'context': <ANY>,
@ -98,7 +98,7 @@
'capabilities': dict({
'max': 65536,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'config_entry_id': <ANY>,
@ -134,7 +134,7 @@
'friendly_name': 'my_device Smooth on',
'max': 65536,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'context': <ANY>,
@ -153,7 +153,7 @@
'capabilities': dict({
'max': 65536,
'min': -10,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'config_entry_id': <ANY>,
@ -189,7 +189,7 @@
'friendly_name': 'my_device Temperature offset',
'max': 65536,
'min': -10,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'context': <ANY>,
@ -208,7 +208,7 @@
'capabilities': dict({
'max': 65536,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'config_entry_id': <ANY>,
@ -244,7 +244,7 @@
'friendly_name': 'my_device Turn off in',
'max': 65536,
'min': 0,
'mode': <NumberMode.AUTO: 'auto'>,
'mode': <NumberMode.BOX: 'box'>,
'step': 1.0,
}),
'context': <ANY>,