Add state translations for helpers (#90356)

* Add state translations for helpers

* Managed via the UI
pull/90380/head
Franck Nijhof 2023-03-27 22:19:25 +02:00 committed by GitHub
parent 9f04c23414
commit fb4b35709d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 196 additions and 7 deletions

View File

@ -5,7 +5,7 @@
"name": "[%key:component::counter::title%]",
"state_attributes": {
"editable": {
"name": "UI-managed",
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"

View File

@ -169,6 +169,11 @@
"unlocked": "[%key:common::state::unlocked%]",
"ok": "[%key:component::binary_sensor::entity_component::problem::state::off%]",
"problem": "[%key:component::binary_sensor::entity_component::problem::state::on%]"
},
"state_attributes": {
"entity_id": {
"name": "Members"
}
}
}
}

View File

@ -6,6 +6,15 @@
"state": {
"off": "[%key:common::state::off%]",
"on": "[%key:common::state::on%]"
},
"state_attributes": {
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
}
}
}
}

View File

@ -0,0 +1,17 @@
{
"title": "Input button",
"entity_component": {
"_": {
"name": "[%key:component::input_button::title%]",
"state_attributes": {
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
}
}
}
}
}

View File

@ -1 +1,38 @@
{ "title": "Input datetime" }
{
"title": "Input datetime",
"entity_component": {
"_": {
"name": "[%key:component::input_datetime::title%]",
"state_attributes": {
"day": {
"name": "Day"
},
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
},
"hour": {
"name": "Hour"
},
"minute": {
"name": "Minute"
},
"month": {
"name": "Month"
},
"second": {
"name": "Second"
},
"timestamp": {
"name": "Timestamp"
},
"year": {
"name": "Year"
}
}
}
}
}

View File

@ -1 +1,37 @@
{ "title": "Input number" }
{
"title": "Input number",
"entity_component": {
"_": {
"name": "[%key:component::input_number::title%]",
"state_attributes": {
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
},
"initial": {
"name": "Initial value"
},
"max": {
"name": "[%key:component::number::entity_component::_::state_attributes::max::name%]"
},
"min": {
"name": "[%key:component::number::entity_component::_::state_attributes::min::name%]"
},
"mode": {
"name": "[%key:component::number::entity_component::_::state_attributes::mode::name%]",
"state": {
"auto": "[%key:component::number::entity_component::_::state_attributes::mode::state::auto%]",
"box": "[%key:component::number::entity_component::_::state_attributes::mode::state::box%]",
"slider": "[%key:component::number::entity_component::_::state_attributes::mode::state::slider%]"
}
},
"step": {
"name": "[%key:component::number::entity_component::_::state_attributes::step::name%]"
}
}
}
}
}

View File

@ -1 +1,20 @@
{ "title": "Input select" }
{
"title": "Input select",
"entity_component": {
"_": {
"name": "[%key:component::input_select::title%]",
"state_attributes": {
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
},
"options": {
"name": "[%key:component::select::entity_component::_::state_attributes::options::name%]"
}
}
}
}
}

View File

@ -1 +1,33 @@
{ "title": "Input text" }
{
"title": "Input text",
"entity_component": {
"_": {
"name": "[%key:component::input_text::title%]",
"state_attributes": {
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
},
"max": {
"name": "[%key:component::text::entity_component::_::state_attributes::max::name%]"
},
"min": {
"name": "[%key:component::text::entity_component::_::state_attributes::min::name%]"
},
"mode": {
"name": "[%key:component::text::entity_component::_::state_attributes::mode::name%]",
"state": {
"text": "[%key:component::text::entity_component::_::state_attributes::mode::state::text%]",
"password": "[%key:component::text::entity_component::_::state_attributes::mode::state::password%]"
}
},
"pattern": {
"name": "[%key:component::text::entity_component::_::state_attributes::pattern::name%]"
}
}
}
}
}

View File

@ -6,6 +6,18 @@
"state": {
"off": "[%key:common::state::off%]",
"on": "[%key:common::state::on%]"
},
"state_attributes": {
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
},
"next_event": {
"name": "Next event"
}
}
}
}

View File

@ -6,6 +6,27 @@
"active": "[%key:common::state::active%]",
"idle": "[%key:common::state::idle%]",
"paused": "[%key:common::state::paused%]"
},
"state_attributes": {
"duration": {
"name": "Duration"
},
"editable": {
"name": "[%key:common::generic::ui_managed%]",
"state": {
"true": "[%key:common::state::yes%]",
"false": "[%key:common::state::no%]"
}
},
"finishes_at": {
"name": "Finishes at"
},
"remaining": {
"name": "Remaining"
},
"restore": {
"name": "Restore"
}
}
}
}

View File

@ -6502,7 +6502,6 @@
"config_flow": false
},
"input_button": {
"name": "Input Button",
"integration_type": "helper",
"config_flow": false
},
@ -6578,6 +6577,7 @@
"growatt_server",
"homekit_controller",
"input_boolean",
"input_button",
"input_datetime",
"input_number",
"input_select",

View File

@ -1,7 +1,8 @@
{
"common": {
"generic": {
"model": "Model"
"model": "Model",
"ui_managed": "Managed via UI"
},
"state": {
"off": "Off",