mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Add entity name translations to Plugwise (#90537)
* Add entity name translations to Plugwise * Re-use extisting translation where possible
This commit is contained in:
parent
cb5326b798
commit
9f95da7793
@ -31,26 +31,27 @@ class PlugwiseBinarySensorEntityDescription(BinarySensorEntityDescription):
|
|||||||
BINARY_SENSORS: tuple[PlugwiseBinarySensorEntityDescription, ...] = (
|
BINARY_SENSORS: tuple[PlugwiseBinarySensorEntityDescription, ...] = (
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="compressor_state",
|
key="compressor_state",
|
||||||
name="Compressor state",
|
translation_key="compressor_state",
|
||||||
icon="mdi:hvac",
|
icon="mdi:hvac",
|
||||||
icon_off="mdi:hvac-off",
|
icon_off="mdi:hvac-off",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="cooling_enabled",
|
key="cooling_enabled",
|
||||||
name="Cooling enabled",
|
translation_key="cooling_enabled",
|
||||||
icon="mdi:snowflake-thermometer",
|
icon="mdi:snowflake-thermometer",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="dhw_state",
|
key="dhw_state",
|
||||||
name="DHW state",
|
translation_key="dhw_state",
|
||||||
icon="mdi:water-pump",
|
icon="mdi:water-pump",
|
||||||
icon_off="mdi:water-pump-off",
|
icon_off="mdi:water-pump-off",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="flame_state",
|
key="flame_state",
|
||||||
|
translation_key="flame_state",
|
||||||
name="Flame state",
|
name="Flame state",
|
||||||
icon="mdi:fire",
|
icon="mdi:fire",
|
||||||
icon_off="mdi:fire-off",
|
icon_off="mdi:fire-off",
|
||||||
@ -58,28 +59,28 @@ BINARY_SENSORS: tuple[PlugwiseBinarySensorEntityDescription, ...] = (
|
|||||||
),
|
),
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="heating_state",
|
key="heating_state",
|
||||||
name="Heating",
|
translation_key="heating_state",
|
||||||
icon="mdi:radiator",
|
icon="mdi:radiator",
|
||||||
icon_off="mdi:radiator-off",
|
icon_off="mdi:radiator-off",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="cooling_state",
|
key="cooling_state",
|
||||||
name="Cooling",
|
translation_key="cooling_state",
|
||||||
icon="mdi:snowflake",
|
icon="mdi:snowflake",
|
||||||
icon_off="mdi:snowflake-off",
|
icon_off="mdi:snowflake-off",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="slave_boiler_state",
|
key="slave_boiler_state",
|
||||||
name="Secondary boiler state",
|
translation_key="slave_boiler_state",
|
||||||
icon="mdi:fire",
|
icon="mdi:fire",
|
||||||
icon_off="mdi:circle-off-outline",
|
icon_off="mdi:circle-off-outline",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
PlugwiseBinarySensorEntityDescription(
|
PlugwiseBinarySensorEntityDescription(
|
||||||
key="plugwise_notification",
|
key="plugwise_notification",
|
||||||
name="Plugwise notification",
|
translation_key="plugwise_notification",
|
||||||
icon="mdi:mailbox-up-outline",
|
icon="mdi:mailbox-up-outline",
|
||||||
icon_off="mdi:mailbox-outline",
|
icon_off="mdi:mailbox-outline",
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
@ -43,9 +43,9 @@ class PlugwiseNumberEntityDescription(
|
|||||||
NUMBER_TYPES = (
|
NUMBER_TYPES = (
|
||||||
PlugwiseNumberEntityDescription(
|
PlugwiseNumberEntityDescription(
|
||||||
key="maximum_boiler_temperature",
|
key="maximum_boiler_temperature",
|
||||||
|
translation_key="maximum_boiler_temperature",
|
||||||
command=lambda api, number, value: api.set_number_setpoint(number, value),
|
command=lambda api, number, value: api.set_number_setpoint(number, value),
|
||||||
device_class=NumberDeviceClass.TEMPERATURE,
|
device_class=NumberDeviceClass.TEMPERATURE,
|
||||||
name="Maximum boiler temperature setpoint",
|
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
native_max_value_key="upper_bound",
|
native_max_value_key="upper_bound",
|
||||||
native_min_value_key="lower_bound",
|
native_min_value_key="lower_bound",
|
||||||
|
@ -37,7 +37,7 @@ class PlugwiseSelectEntityDescription(
|
|||||||
SELECT_TYPES = (
|
SELECT_TYPES = (
|
||||||
PlugwiseSelectEntityDescription(
|
PlugwiseSelectEntityDescription(
|
||||||
key="select_schedule",
|
key="select_schedule",
|
||||||
name="Thermostat schedule",
|
translation_key="select_schedule",
|
||||||
icon="mdi:calendar-clock",
|
icon="mdi:calendar-clock",
|
||||||
command=lambda api, loc, opt: api.set_schedule_state(loc, opt, STATE_ON),
|
command=lambda api, loc, opt: api.set_schedule_state(loc, opt, STATE_ON),
|
||||||
current_option_key="selected_schedule",
|
current_option_key="selected_schedule",
|
||||||
@ -45,20 +45,18 @@ SELECT_TYPES = (
|
|||||||
),
|
),
|
||||||
PlugwiseSelectEntityDescription(
|
PlugwiseSelectEntityDescription(
|
||||||
key="select_regulation_mode",
|
key="select_regulation_mode",
|
||||||
name="Regulation mode",
|
translation_key="regulation_mode",
|
||||||
icon="mdi:hvac",
|
icon="mdi:hvac",
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
translation_key="regulation_mode",
|
|
||||||
command=lambda api, loc, opt: api.set_regulation_mode(opt),
|
command=lambda api, loc, opt: api.set_regulation_mode(opt),
|
||||||
current_option_key="regulation_mode",
|
current_option_key="regulation_mode",
|
||||||
options_key="regulation_modes",
|
options_key="regulation_modes",
|
||||||
),
|
),
|
||||||
PlugwiseSelectEntityDescription(
|
PlugwiseSelectEntityDescription(
|
||||||
key="select_dhw_mode",
|
key="select_dhw_mode",
|
||||||
name="DHW mode",
|
translation_key="dhw_mode",
|
||||||
icon="mdi:shower",
|
icon="mdi:shower",
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
translation_key="dhw_mode",
|
|
||||||
command=lambda api, loc, opt: api.set_dhw_mode(opt),
|
command=lambda api, loc, opt: api.set_dhw_mode(opt),
|
||||||
current_option_key="dhw_mode",
|
current_option_key="dhw_mode",
|
||||||
options_key="dhw_modes",
|
options_key="dhw_modes",
|
||||||
|
@ -26,38 +26,94 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"entity": {
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"compressor_state": {
|
||||||
|
"name": "Compressor state"
|
||||||
|
},
|
||||||
|
"cooling_enabled": {
|
||||||
|
"name": "Cooling enabled"
|
||||||
|
},
|
||||||
|
"dhw_state": {
|
||||||
|
"name": "DHW state"
|
||||||
|
},
|
||||||
|
"flame_state": {
|
||||||
|
"name": "Flame state"
|
||||||
|
},
|
||||||
|
"heating_state": {
|
||||||
|
"name": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::heating%]"
|
||||||
|
},
|
||||||
|
"cooling_state": {
|
||||||
|
"name": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::cooling%]"
|
||||||
|
},
|
||||||
|
"slave_boiler_state": {
|
||||||
|
"name": "Secondary boiler state"
|
||||||
|
},
|
||||||
|
"plugwise_notification": {
|
||||||
|
"name": "Plugwise notification"
|
||||||
|
}
|
||||||
|
},
|
||||||
"climate": {
|
"climate": {
|
||||||
"plugwise": {
|
"plugwise": {
|
||||||
"state_attributes": {
|
"state_attributes": {
|
||||||
|
"available_schemas": {
|
||||||
|
"name": "Available schemas"
|
||||||
|
},
|
||||||
"preset_mode": {
|
"preset_mode": {
|
||||||
"state": {
|
"state": {
|
||||||
"asleep": "Night",
|
"asleep": "Night",
|
||||||
"away": "Away",
|
"away": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::away%]",
|
||||||
"home": "Home",
|
"home": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::home%]",
|
||||||
"no_frost": "Anti-frost",
|
"no_frost": "Anti-frost",
|
||||||
"vacation": "Vacation"
|
"vacation": "Vacation"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"selected_schema": {
|
||||||
|
"name": "Selected schema"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"number": {
|
||||||
|
"maximum_boiler_temperature": {
|
||||||
|
"name": "Maximum boiler temperature setpoint"
|
||||||
|
}
|
||||||
|
},
|
||||||
"select": {
|
"select": {
|
||||||
"dhw_mode": {
|
"dhw_mode": {
|
||||||
|
"name": "DHW mode",
|
||||||
"state": {
|
"state": {
|
||||||
"off": "Off",
|
"off": "[%key:common::state::off%]",
|
||||||
"auto": "Auto",
|
"auto": "Auto",
|
||||||
"boost": "Boost",
|
"boost": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::boost%]",
|
||||||
"comfort": "Comfort"
|
"comfort": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::comfort%]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"regulation_mode": {
|
"regulation_mode": {
|
||||||
|
"name": "Regulation mode",
|
||||||
"state": {
|
"state": {
|
||||||
"bleeding_cold": "Bleeding cold",
|
"bleeding_cold": "Bleeding cold",
|
||||||
"bleeding_hot": "Bleeding hot",
|
"bleeding_hot": "Bleeding hot",
|
||||||
"cooling": "Cooling",
|
"cooling": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::cooling%]",
|
||||||
"heating": "Heating",
|
"heating": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::heating%]",
|
||||||
"off": "Off"
|
"off": "[%key:common::state::off%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"select_schedule": {
|
||||||
|
"name": "Thermostat schedule"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"cooling_ena_switch": {
|
||||||
|
"name": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::cooling%]"
|
||||||
|
},
|
||||||
|
"dhw_cm_switch": {
|
||||||
|
"name": "DHW comfort mode"
|
||||||
|
},
|
||||||
|
"lock": {
|
||||||
|
"name": "[%key:component::lock::entity_component::_::name%]"
|
||||||
|
},
|
||||||
|
"relay": {
|
||||||
|
"name": "Relay"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,19 +21,19 @@ from .util import plugwise_command
|
|||||||
SWITCHES: tuple[SwitchEntityDescription, ...] = (
|
SWITCHES: tuple[SwitchEntityDescription, ...] = (
|
||||||
SwitchEntityDescription(
|
SwitchEntityDescription(
|
||||||
key="dhw_cm_switch",
|
key="dhw_cm_switch",
|
||||||
name="DHW comfort mode",
|
translation_key="dhw_cm_switch",
|
||||||
icon="mdi:water-plus",
|
icon="mdi:water-plus",
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
),
|
),
|
||||||
SwitchEntityDescription(
|
SwitchEntityDescription(
|
||||||
key="lock",
|
key="lock",
|
||||||
name="Lock",
|
translation_key="lock",
|
||||||
icon="mdi:lock",
|
icon="mdi:lock",
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
),
|
),
|
||||||
SwitchEntityDescription(
|
SwitchEntityDescription(
|
||||||
key="relay",
|
key="relay",
|
||||||
name="Relay",
|
translation_key="relay",
|
||||||
device_class=SwitchDeviceClass.SWITCH,
|
device_class=SwitchDeviceClass.SWITCH,
|
||||||
),
|
),
|
||||||
SwitchEntityDescription(
|
SwitchEntityDescription(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user