mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Add child lock for tplink thermostats (#129649)
This commit is contained in:
parent
8889464e04
commit
72bcc6702f
@ -68,6 +68,9 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"on": "mdi:sleep"
|
"on": "mdi:sleep"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"child_lock": {
|
||||||
|
"default": "mdi:account-lock"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sensor": {
|
"sensor": {
|
||||||
|
@ -190,6 +190,9 @@
|
|||||||
},
|
},
|
||||||
"fan_sleep_mode": {
|
"fan_sleep_mode": {
|
||||||
"name": "Fan sleep mode"
|
"name": "Fan sleep mode"
|
||||||
|
},
|
||||||
|
"child_lock": {
|
||||||
|
"name": "Child lock"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"number": {
|
"number": {
|
||||||
|
@ -48,6 +48,9 @@ SWITCH_DESCRIPTIONS: tuple[TPLinkSwitchEntityDescription, ...] = (
|
|||||||
TPLinkSwitchEntityDescription(
|
TPLinkSwitchEntityDescription(
|
||||||
key="fan_sleep_mode",
|
key="fan_sleep_mode",
|
||||||
),
|
),
|
||||||
|
TPLinkSwitchEntityDescription(
|
||||||
|
key="child_lock",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
SWITCH_DESCRIPTIONS_MAP = {desc.key: desc for desc in SWITCH_DESCRIPTIONS}
|
SWITCH_DESCRIPTIONS_MAP = {desc.key: desc for desc in SWITCH_DESCRIPTIONS}
|
||||||
|
@ -34,6 +34,11 @@
|
|||||||
"type": "Switch",
|
"type": "Switch",
|
||||||
"category": "Config"
|
"category": "Config"
|
||||||
},
|
},
|
||||||
|
"child_lock": {
|
||||||
|
"value": true,
|
||||||
|
"type": "Switch",
|
||||||
|
"category": "Config"
|
||||||
|
},
|
||||||
"current_consumption": {
|
"current_consumption": {
|
||||||
"value": 5.23,
|
"value": 5.23,
|
||||||
"type": "Sensor",
|
"type": "Sensor",
|
||||||
|
@ -173,6 +173,52 @@
|
|||||||
'state': 'on',
|
'state': 'on',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
|
# name: test_states[switch.my_device_child_lock-entry]
|
||||||
|
EntityRegistryEntrySnapshot({
|
||||||
|
'aliases': set({
|
||||||
|
}),
|
||||||
|
'area_id': None,
|
||||||
|
'capabilities': None,
|
||||||
|
'config_entry_id': <ANY>,
|
||||||
|
'device_class': None,
|
||||||
|
'device_id': <ANY>,
|
||||||
|
'disabled_by': None,
|
||||||
|
'domain': 'switch',
|
||||||
|
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||||
|
'entity_id': 'switch.my_device_child_lock',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'labels': set({
|
||||||
|
}),
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': None,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Child lock',
|
||||||
|
'platform': 'tplink',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'child_lock',
|
||||||
|
'unique_id': '123456789ABCDEFGH_child_lock',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_states[switch.my_device_child_lock-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'friendly_name': 'my_device Child lock',
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'switch.my_device_child_lock',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'on',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_states[switch.my_device_fan_sleep_mode-entry]
|
# name: test_states[switch.my_device_fan_sleep_mode-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user