mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add improvements of device_automation from frontend PR 3514 (#26295)
* Add improvements from frontend PR 3514 * Fix test * Tweak
This commit is contained in:
parent
79488daddf
commit
3aa2729716
@ -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,
|
||||
}
|
||||
)
|
||||
|
8
homeassistant/components/light/strings.json
Normal file
8
homeassistant/components/light/strings.json
Normal file
@ -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…
x
Reference in New Issue
Block a user