Use common string references for device_automation translations (#95897)

This commit is contained in:
Jan Bouwhuis 2023-07-10 12:56:51 +02:00 committed by GitHub
parent af03a284a5
commit 7eb087a9d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 71 additions and 55 deletions

View File

@ -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",
@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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%]"
}
}
}

View File

@ -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": {

View File

@ -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": {

View File

@ -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",

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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",