Skip to content

Commit

Permalink
Migrate automation services to support translations (home-assistant#9…
Browse files Browse the repository at this point in the history
…6306)

* Migrate automation services to support translations

* Apply suggestions from code review

Co-authored-by: c0ffeeca7 <[email protected]>

---------

Co-authored-by: c0ffeeca7 <[email protected]>
  • Loading branch information
frenck and c0ffeeca7 authored Jul 11, 2023
1 parent 2330af8 commit bde7d73
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
14 changes: 0 additions & 14 deletions homeassistant/components/automation/services.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,32 @@
# Describes the format for available automation services
turn_on:
name: Turn on
description: Enable an automation.
target:
entity:
domain: automation

turn_off:
name: Turn off
description: Disable an automation.
target:
entity:
domain: automation
fields:
stop_actions:
name: Stop actions
description: Stop currently running actions.
default: true
selector:
boolean:

toggle:
name: Toggle
description: Toggle (enable / disable) an automation.
target:
entity:
domain: automation

trigger:
name: Trigger
description: Trigger the actions of an automation.
target:
entity:
domain: automation
fields:
skip_condition:
name: Skip conditions
description: Whether or not the conditions will be skipped.
default: true
selector:
boolean:

reload:
name: Reload
description: Reload the automation configuration.
34 changes: 34 additions & 0 deletions homeassistant/components/automation/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,39 @@
}
}
}
},
"services": {
"turn_on": {
"name": "Turn on",
"description": "Enables an automation."
},
"turn_off": {
"name": "Turn off",
"description": "Disables an automation.",
"fields": {
"stop_actions": {
"name": "Stop actions",
"description": "Stops currently running actions."
}
}
},
"toggle": {
"name": "Toggle",
"description": "Toggles (enable / disable) an automation."
},
"trigger": {
"name": "Trigger",
"description": "Triggers the actions of an automation.",
"fields": {
"skip_condition": {
"name": "Skip conditions",
"description": "Defines whether or not the conditions will be skipped."
}
}
},
"reload": {
"name": "Reload",
"description": "Reloads the automation configuration."
}
}
}

0 comments on commit bde7d73

Please sign in to comment.