Skip to content

Commit

Permalink
[EN] Explicit and friendly domain name for HassTurnOn/HassTurnOff (#2418
Browse files Browse the repository at this point in the history
)

* Fix response when turning media player on/off

* Fix all domains

* Guard against empty domain (lint)
  • Loading branch information
tetele authored Oct 22, 2024
1 parent f37886b commit b4e77bb
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
22 changes: 21 additions & 1 deletion responses/en/HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@ language: en
responses:
intents:
HassTurnOff:
default: "Turned off the {{ state.domain }}"
default: >-
{% set translations = {
"button": "the button",
"camera": "the camera",
"input_button": "the button",
"alarm_control_panel": "the alarm",
"automation": "the automation",
"fan": "the fan",
"climate": "the thermostat",
"humidifier": "the humidifier",
"input_boolean": "the switch",
"siren": "the siren",
"water_heater": "the water heater",
"light": "the light",
"switch": "the switch",
"remote": "the remote",
"vacuum": "the vacuum cleaner",
"media_player": "the media player",
"lawn_mower": "the lawn mower"
} %}
Turned off {{ translations.get(state.domain) }}
lights_area: "Turned off the lights"
lights_floor: "Turned off the lights"
fans_area: "Turned off the fans"
Expand Down
22 changes: 21 additions & 1 deletion responses/en/HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@ language: en
responses:
intents:
HassTurnOn:
default: "Turned on the {{ state.domain }}"
default: >-
{% set translations = {
"button": "the button",
"camera": "the camera",
"input_button": "the button",
"alarm_control_panel": "the alarm",
"automation": "the automation",
"fan": "the fan",
"climate": "the thermostat",
"humidifier": "the humidifier",
"input_boolean": "the switch",
"siren": "the siren",
"water_heater": "the water heater",
"light": "the light",
"switch": "the switch",
"remote": "the remote",
"vacuum": "the vacuum cleaner",
"media_player": "the media player",
"lawn_mower": "the lawn mower"
} %}
Turned on {{ translations.get(state.domain) }}
lights_area: "Turned on the lights"
lights_floor: "Turned on the lights"
light_all: "Turned on all of the lights"
Expand Down

0 comments on commit b4e77bb

Please sign in to comment.