mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Add Status indicator light switch to Roborock (#93842)
add status indicator light switch
This commit is contained in:
parent
676b6ab706
commit
1d7498378e
@ -100,6 +100,9 @@
|
|||||||
"switch": {
|
"switch": {
|
||||||
"child_lock": {
|
"child_lock": {
|
||||||
"name": "Child lock"
|
"name": "Child lock"
|
||||||
|
},
|
||||||
|
"status_indicator": {
|
||||||
|
"name": "Status indicator light"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vacuum": {
|
"vacuum": {
|
||||||
|
@ -50,7 +50,18 @@ SWITCH_DESCRIPTIONS: list[RoborockSwitchDescription] = [
|
|||||||
translation_key="child_lock",
|
translation_key="child_lock",
|
||||||
icon="mdi:account-lock",
|
icon="mdi:account-lock",
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
)
|
),
|
||||||
|
RoborockSwitchDescription(
|
||||||
|
set_command=lambda entity, value: entity.send(
|
||||||
|
RoborockCommand.SET_FLOW_LED_STATUS, {"status": 1 if value else 0}
|
||||||
|
),
|
||||||
|
get_value=lambda data: data.send(RoborockCommand.GET_FLOW_LED_STATUS),
|
||||||
|
evaluate_value=lambda data: data["status"] == 1,
|
||||||
|
key="status_indicator",
|
||||||
|
translation_key="status_indicator",
|
||||||
|
icon="mdi:alarm-light-outline",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ from tests.common import MockConfigEntry
|
|||||||
("entity_id"),
|
("entity_id"),
|
||||||
[
|
[
|
||||||
("switch.roborock_s7_maxv_child_lock"),
|
("switch.roborock_s7_maxv_child_lock"),
|
||||||
|
("switch.roborock_s7_maxv_status_indicator_light"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_update_success(
|
async def test_update_success(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user