From db0535fa444416b9ca7bd5a4bbcf23f01d8c38f4 Mon Sep 17 00:00:00 2001 From: farmio Date: Mon, 22 Apr 2024 16:37:22 +0200 Subject: [PATCH] Move extra_fields translations to backend --- homeassistant/components/alarm_control_panel/strings.json | 4 ++++ homeassistant/components/binary_sensor/strings.json | 3 +++ homeassistant/components/climate/strings.json | 8 ++++++++ homeassistant/components/cover/strings.json | 6 ++++++ homeassistant/components/device_tracker/strings.json | 3 +++ homeassistant/components/humidifier/strings.json | 7 +++++++ homeassistant/components/light/strings.json | 4 ++++ homeassistant/components/lock/strings.json | 3 +++ homeassistant/components/media_player/strings.json | 3 +++ homeassistant/components/mobile_app/strings.json | 4 ++++ homeassistant/components/number/strings.json | 3 +++ homeassistant/components/select/strings.json | 7 +++++++ homeassistant/components/sensor/strings.json | 5 +++++ homeassistant/components/text/strings.json | 3 +++ homeassistant/components/vacuum/strings.json | 3 +++ homeassistant/strings.json | 8 ++++++++ 16 files changed, 74 insertions(+) diff --git a/homeassistant/components/alarm_control_panel/strings.json b/homeassistant/components/alarm_control_panel/strings.json index deaab6d75eedad..6dac4d069a18f5 100644 --- a/homeassistant/components/alarm_control_panel/strings.json +++ b/homeassistant/components/alarm_control_panel/strings.json @@ -17,6 +17,10 @@ "is_armed_night": "{entity_name} is armed night", "is_armed_vacation": "{entity_name} is armed vacation" }, + "extra_fields": { + "code": "Code", + "for": "[%key:common::device_automation::extra_fields::for%]" + }, "trigger_type": { "triggered": "{entity_name} triggered", "disarmed": "{entity_name} disarmed", diff --git a/homeassistant/components/binary_sensor/strings.json b/homeassistant/components/binary_sensor/strings.json index 29e40c8b336156..162cf139a1d93f 100644 --- a/homeassistant/components/binary_sensor/strings.json +++ b/homeassistant/components/binary_sensor/strings.json @@ -55,6 +55,9 @@ "is_on": "[%key:common::device_automation::condition_type::is_on%]", "is_off": "[%key:common::device_automation::condition_type::is_off%]" }, + "extra_fields": { + "for": "[%key:common::device_automation::extra_fields::for%]" + }, "trigger_type": { "bat_low": "{entity_name} battery low", "not_bat_low": "{entity_name} battery normal", diff --git a/homeassistant/components/climate/strings.json b/homeassistant/components/climate/strings.json index c31d22ccbebb34..2a7fea9136cc98 100644 --- a/homeassistant/components/climate/strings.json +++ b/homeassistant/components/climate/strings.json @@ -13,6 +13,14 @@ "action_type": { "set_hvac_mode": "Change HVAC mode on {entity_name}", "set_preset_mode": "Change preset on {entity_name}" + }, + "extra_fields": { + "above": "[%key:common::device_automation::extra_fields::above%]", + "below": "[%key:common::device_automation::extra_fields::below%]", + "for": "[%key:common::device_automation::extra_fields::for%]", + "to": "[%key:common::device_automation::extra_fields::to%]", + "preset_mode": "Preset mode", + "hvac_mode": "HVAC mode" } }, "entity_component": { diff --git a/homeassistant/components/cover/strings.json b/homeassistant/components/cover/strings.json index 979835fcfd27f1..0afef8a200f7d1 100644 --- a/homeassistant/components/cover/strings.json +++ b/homeassistant/components/cover/strings.json @@ -18,6 +18,12 @@ "is_position": "Current {entity_name} position is", "is_tilt_position": "Current {entity_name} tilt position is" }, + "extra_fields": { + "above": "[%key:common::device_automation::extra_fields::above%]", + "below": "[%key:common::device_automation::extra_fields::below%]", + "for": "[%key:common::device_automation::extra_fields::for%]", + "position": "Position" + }, "trigger_type": { "opened": "{entity_name} opened", "closed": "{entity_name} closed", diff --git a/homeassistant/components/device_tracker/strings.json b/homeassistant/components/device_tracker/strings.json index 44c43219b82a2d..d6e36d92300022 100644 --- a/homeassistant/components/device_tracker/strings.json +++ b/homeassistant/components/device_tracker/strings.json @@ -5,6 +5,9 @@ "is_home": "{entity_name} is home", "is_not_home": "{entity_name} is not home" }, + "extra_fields": { + "zone": "[%key:common::device_automation::extra_fields::zone%]" + }, "trigger_type": { "enters": "{entity_name} enters a zone", "leaves": "{entity_name} leaves a zone" diff --git a/homeassistant/components/humidifier/strings.json b/homeassistant/components/humidifier/strings.json index cb59dd04bddb91..0416f4a68a6338 100644 --- a/homeassistant/components/humidifier/strings.json +++ b/homeassistant/components/humidifier/strings.json @@ -18,6 +18,13 @@ "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%]" + }, + "extra_fields": { + "above": "[%key:common::device_automation::extra_fields::above%]", + "below": "[%key:common::device_automation::extra_fields::below%]", + "for": "[%key:common::device_automation::extra_fields::for%]", + "mode": "Mode", + "humidity": "Humidity" } }, "entity_component": { diff --git a/homeassistant/components/light/strings.json b/homeassistant/components/light/strings.json index 8be954f465355c..558e31129a96d7 100644 --- a/homeassistant/components/light/strings.json +++ b/homeassistant/components/light/strings.json @@ -17,6 +17,10 @@ "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%]" + }, + "extra_fields": { + "brightness_pct": "Brightness", + "flash": "Flash" } }, "entity_component": { diff --git a/homeassistant/components/lock/strings.json b/homeassistant/components/lock/strings.json index 3b36171bf9450d..fd8636acf9706c 100644 --- a/homeassistant/components/lock/strings.json +++ b/homeassistant/components/lock/strings.json @@ -15,6 +15,9 @@ "locked": "{entity_name} locked", "unlocked": "{entity_name} unlocked", "open": "{entity_name} opened" + }, + "extra_fields": { + "for": "[%key:common::device_automation::extra_fields::for%]" } }, "entity_component": { diff --git a/homeassistant/components/media_player/strings.json b/homeassistant/components/media_player/strings.json index bcf594a2675abd..ff246e420ced0e 100644 --- a/homeassistant/components/media_player/strings.json +++ b/homeassistant/components/media_player/strings.json @@ -17,6 +17,9 @@ "paused": "{entity_name} is paused", "playing": "{entity_name} starts playing", "changed_states": "[%key:common::device_automation::trigger_type::changed_states%]" + }, + "extra_fields": { + "for": "[%key:common::device_automation::extra_fields::for%]" } }, "entity_component": { diff --git a/homeassistant/components/mobile_app/strings.json b/homeassistant/components/mobile_app/strings.json index 9e388ebc76cd71..3d3e0767312eb7 100644 --- a/homeassistant/components/mobile_app/strings.json +++ b/homeassistant/components/mobile_app/strings.json @@ -13,6 +13,10 @@ "device_automation": { "action_type": { "notify": "Send a notification" + }, + "extra_fields": { + "message": "Message", + "title": "Title" } } } diff --git a/homeassistant/components/number/strings.json b/homeassistant/components/number/strings.json index 502b2b4affd3b4..d6932286469e82 100644 --- a/homeassistant/components/number/strings.json +++ b/homeassistant/components/number/strings.json @@ -3,6 +3,9 @@ "device_automation": { "action_type": { "set_value": "Set value for {entity_name}" + }, + "extra_fields": { + "value": "[%key:common::device_automation::extra_fields::value%]" } }, "entity_component": { diff --git a/homeassistant/components/select/strings.json b/homeassistant/components/select/strings.json index 9c9d1136b996c9..02c1765133a04f 100644 --- a/homeassistant/components/select/strings.json +++ b/homeassistant/components/select/strings.json @@ -13,6 +13,13 @@ }, "condition_type": { "selected_option": "Current {entity_name} selected option" + }, + "extra_fields": { + "for": "[%key:common::device_automation::extra_fields::for%]", + "to": "[%key:common::device_automation::extra_fields::to%]", + "cycle": "Cycle", + "from": "From", + "option": "Option" } }, "entity_component": { diff --git a/homeassistant/components/sensor/strings.json b/homeassistant/components/sensor/strings.json index fad1086c034f82..101b32f373fe47 100644 --- a/homeassistant/components/sensor/strings.json +++ b/homeassistant/components/sensor/strings.json @@ -98,6 +98,11 @@ "water": "{entity_name} water changes", "weight": "{entity_name} weight changes", "wind_speed": "{entity_name} wind speed changes" + }, + "extra_fields": { + "above": "[%key:common::device_automation::extra_fields::above%]", + "below": "[%key:common::device_automation::extra_fields::below%]", + "for": "[%key:common::device_automation::extra_fields::for%]" } }, "entity_component": { diff --git a/homeassistant/components/text/strings.json b/homeassistant/components/text/strings.json index 82cab559d0e568..1389d5aa50060d 100644 --- a/homeassistant/components/text/strings.json +++ b/homeassistant/components/text/strings.json @@ -3,6 +3,9 @@ "device_automation": { "action_type": { "set_value": "Set value for {entity_name}" + }, + "extra_fields": { + "value": "[%key:common::device_automation::extra_fields::value%]" } }, "entity_component": { diff --git a/homeassistant/components/vacuum/strings.json b/homeassistant/components/vacuum/strings.json index 673c76b7f8d6a2..1efaf87e7488eb 100644 --- a/homeassistant/components/vacuum/strings.json +++ b/homeassistant/components/vacuum/strings.json @@ -12,6 +12,9 @@ "action_type": { "clean": "Let {entity_name} clean", "dock": "Let {entity_name} return to the dock" + }, + "extra_fields": { + "for": "[%key:common::device_automation::extra_fields::for%]" } }, "entity_component": { diff --git a/homeassistant/strings.json b/homeassistant/strings.json index b31e83394bbacf..fca55353aa0ab2 100644 --- a/homeassistant/strings.json +++ b/homeassistant/strings.json @@ -9,6 +9,14 @@ "is_on": "{entity_name} is on", "is_off": "{entity_name} is off" }, + "extra_fields": { + "above": "Above", + "below": "Below", + "for": "Duration", + "to": "To", + "value": "Value", + "zone": "Zone" + }, "trigger_type": { "changed_states": "{entity_name} turned on or off", "turned_on": "{entity_name} turned on",