Add improvements of device_automation from frontend PR 3514 (#26295)
* Add improvements from frontend PR 3514 * Fix test * Tweakpull/26347/head
parent
79488daddf
commit
3aa2729716
homeassistant/components
tests/components/device_automation
|
@ -4,6 +4,7 @@
|
|||
"documentation": "https://www.home-assistant.io/components/automation",
|
||||
"requirements": [],
|
||||
"dependencies": [
|
||||
"device_automation",
|
||||
"group",
|
||||
"webhook"
|
||||
],
|
||||
|
|
|
@ -75,7 +75,7 @@ async def async_get_device_automation_triggers(hass, device_id):
|
|||
@websocket_api.async_response
|
||||
@websocket_api.websocket_command(
|
||||
{
|
||||
vol.Required("type"): "device_automation/list_triggers",
|
||||
vol.Required("type"): "device_automation/trigger/list",
|
||||
vol.Required("device_id"): str,
|
||||
}
|
||||
)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"device_automation": {
|
||||
"trigger_type": {
|
||||
"turn_on": "{name} turned on",
|
||||
"turn_off": "{name} turned off"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -62,7 +62,7 @@ async def test_websocket_get_triggers(hass, hass_ws_client, device_reg, entity_r
|
|||
await client.send_json(
|
||||
{
|
||||
"id": 1,
|
||||
"type": "device_automation/list_triggers",
|
||||
"type": "device_automation/trigger/list",
|
||||
"device_id": device_entry.id,
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue