Skip to content

Commit

Permalink
Use common string references for device_automation translations (home…
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwh authored Jul 10, 2023
1 parent af03a28 commit 7eb087a
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 55 deletions.
8 changes: 4 additions & 4 deletions homeassistant/components/binary_sensor/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"is_no_vibration": "{entity_name} is not detecting vibration",
"is_open": "{entity_name} is open",
"is_not_open": "{entity_name} is closed",
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]"
},
"trigger_type": {
"bat_low": "{entity_name} battery low",
Expand Down Expand Up @@ -106,8 +106,8 @@
"no_vibration": "{entity_name} stopped detecting vibration",
"opened": "{entity_name} opened",
"not_opened": "{entity_name} closed",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off"
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]"
}
},
"entity_component": {
Expand Down
16 changes: 8 additions & 8 deletions homeassistant/components/fan/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"title": "Fan",
"device_automation": {
"condition_type": {
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]"
},
"trigger_type": {
"changed_states": "{entity_name} turned on or off",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off"
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]"
},
"action_type": {
"toggle": "Toggle {entity_name}",
"turn_on": "Turn on {entity_name}",
"turn_off": "Turn off {entity_name}"
"toggle": "[%key:common::device_automation::action_type::toggle%]",
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]"
}
},
"entity_component": {
Expand Down
16 changes: 8 additions & 8 deletions homeassistant/components/humidifier/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
"device_automation": {
"trigger_type": {
"target_humidity_changed": "{entity_name} target humidity changed",
"changed_states": "{entity_name} turned on or off",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off"
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]"
},
"condition_type": {
"is_mode": "{entity_name} is set to a specific mode",
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]"
},
"action_type": {
"set_humidity": "Set humidity for {entity_name}",
"set_mode": "Change mode on {entity_name}",
"toggle": "Toggle {entity_name}",
"turn_on": "Turn on {entity_name}",
"turn_off": "Turn off {entity_name}"
"toggle": "[%key:common::device_automation::action_type::toggle%]",
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]"
}
},
"entity_component": {
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/kodi/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
},
"device_automation": {
"trigger_type": {
"turn_on": "{entity_name} was requested to turn on",
"turn_off": "{entity_name} was requested to turn off"
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]"
}
}
}
16 changes: 8 additions & 8 deletions homeassistant/components/light/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"action_type": {
"brightness_decrease": "Decrease {entity_name} brightness",
"brightness_increase": "Increase {entity_name} brightness",
"toggle": "Toggle {entity_name}",
"turn_on": "Turn on {entity_name}",
"turn_off": "Turn off {entity_name}",
"toggle": "[%key:common::device_automation::action_type::toggle%]",
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]",
"flash": "Flash {entity_name}"
},
"condition_type": {
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]"
},
"trigger_type": {
"changed_states": "{entity_name} turned on or off",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off"
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]"
}
},
"entity_component": {
Expand Down
10 changes: 5 additions & 5 deletions homeassistant/components/media_player/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"device_automation": {
"condition_type": {
"is_buffering": "{entity_name} is buffering",
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off",
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]",
"is_idle": "{entity_name} is idle",
"is_paused": "{entity_name} is paused",
"is_playing": "{entity_name} is playing"
},
"trigger_type": {
"buffering": "{entity_name} starts buffering",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]",
"idle": "{entity_name} becomes idle",
"paused": "{entity_name} is paused",
"playing": "{entity_name} starts playing",
"changed_states": "{entity_name} changed states"
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]"
}
},
"entity_component": {
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/netatmo/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"hg": "Frost guard"
},
"trigger_type": {
"turned_off": "{entity_name} turned off",
"turned_on": "{entity_name} turned on",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"human": "{entity_name} detected a human",
"movement": "{entity_name} detected movement",
"person": "{entity_name} detected a person",
Expand Down
16 changes: 8 additions & 8 deletions homeassistant/components/remote/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"title": "Remote",
"device_automation": {
"action_type": {
"toggle": "Toggle {entity_name}",
"turn_on": "Turn on {entity_name}",
"turn_off": "Turn off {entity_name}"
"toggle": "[%key:common::device_automation::action_type::toggle%]",
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]"
},
"condition_type": {
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]"
},
"trigger_type": {
"changed_states": "{entity_name} turned on or off",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off"
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]"
}
},
"entity_component": {
Expand Down
16 changes: 8 additions & 8 deletions homeassistant/components/switch/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"title": "Switch",
"device_automation": {
"action_type": {
"toggle": "Toggle {entity_name}",
"turn_on": "Turn on {entity_name}",
"turn_off": "Turn off {entity_name}"
"toggle": "[%key:common::device_automation::action_type::toggle%]",
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]"
},
"condition_type": {
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]"
},
"trigger_type": {
"changed_states": "{entity_name} turned on or off",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off"
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]"
}
},
"entity_component": {
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/water_heater/strings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"device_automation": {
"action_type": {
"turn_on": "Turn on {entity_name}",
"turn_off": "Turn off {entity_name}"
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]"
}
},
"entity_component": {
Expand Down
16 changes: 16 additions & 0 deletions homeassistant/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@
"model": "Model",
"ui_managed": "Managed via UI"
},
"device_automation": {
"condition_type": {
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
},
"trigger_type": {
"changed_states": "{entity_name} turned on or off",
"turned_on": "{entity_name} turned on",
"turned_off": "{entity_name} turned off"
},
"action_type": {
"toggle": "Toggle {entity_name}",
"turn_on": "Turn on {entity_name}",
"turn_off": "Turn off {entity_name}"
}
},
"state": {
"off": "Off",
"on": "On",
Expand Down

0 comments on commit 7eb087a

Please sign in to comment.