From d106cb48d2cebfc41883e9faf51b2769b8b5dffb Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 18 Mar 2023 01:35:25 +0100 Subject: [PATCH] Add state attribute translations for light (#89818) * Add state attribute translations for light * Process review comments --- homeassistant/components/light/strings.json | 59 +++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/homeassistant/components/light/strings.json b/homeassistant/components/light/strings.json index ef3fa74bd98..935e38d33d9 100644 --- a/homeassistant/components/light/strings.json +++ b/homeassistant/components/light/strings.json @@ -25,6 +25,65 @@ "state": { "off": "[%key:common::state::off%]", "on": "[%key:common::state::on%]" + }, + "state_attributes": { + "brightness": { + "name": "Brightness" + }, + "color_mode": { + "name": "Color mode", + "state": { + "brightness": "Brightness only", + "color_temp": "Color temperature", + "hs": "HS", + "onoff": "On/Off", + "rgb": "RGB", + "rgbw": "RGBW", + "rgbww": "RGBWW", + "unknown": "Unknown", + "white": "White", + "xy": "XY" + } + }, + "color_temp": { + "name": "Color temperature (mireds)" + }, + "color_temp_kelvin": { + "name": "Color temperature (Kelvin)" + }, + "effect": { + "name": "Effect" + }, + "effect_list": { + "name": "Available effects" + }, + "max_color_temp_kelvin": { + "name": "Maximum color temperature (Kelvin)" + }, + "min_color_temp_kelvin": { + "name": "Minimum color temperature (Kelvin)" + }, + "max_mireds": { + "name": "Maximum color temperature (mireds)" + }, + "min_mireds": { + "name": "Minimum color temperature (mireds)" + }, + "supported_color_modes": { + "name": "Available color modes", + "state": { + "brightness": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::brightness%]", + "color_temp": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::color_temp%]", + "hs": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::hs%]", + "onoff": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::onoff%]", + "rgb": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::rgb%]", + "rgbw": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::rgbw%]", + "rgbww": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::rgbww%]", + "unknown": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::unknown%]", + "white": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::white%]", + "xy": "[%key:component::light::entity_component::_::state_attributes::color_mode::state::xy%]" + } + } } } }