Add entity translations for plugwise (#95808)

This commit is contained in:
Joost Lekkerkerker 2023-07-08 10:48:14 +02:00 committed by GitHub
parent f4ad261f51
commit bbf97fdf01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 187 additions and 51 deletions

View File

@ -39,7 +39,7 @@ async def async_setup_entry(
class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
"""Representation of an Plugwise thermostat."""
"""Representation of a Plugwise thermostat."""
_attr_has_entity_name = True
_attr_name = None

View File

@ -30,7 +30,7 @@ from .entity import PlugwiseEntity
SENSORS: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key="setpoint",
name="Setpoint",
translation_key="setpoint",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
@ -38,7 +38,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="setpoint_high",
name="Cooling setpoint",
translation_key="cooling_setpoint",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
@ -46,7 +46,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="setpoint_low",
name="Heating setpoint",
translation_key="heating_setpoint",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
@ -54,7 +54,6 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="temperature",
name="Temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -62,7 +61,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="intended_boiler_temperature",
name="Intended boiler temperature",
translation_key="intended_boiler_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -70,7 +69,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="temperature_difference",
name="Temperature difference",
translation_key="temperature_difference",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -78,14 +77,14 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="outdoor_temperature",
name="Outdoor temperature",
translation_key="outdoor_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="outdoor_air_temperature",
name="Outdoor air temperature",
translation_key="outdoor_air_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -93,7 +92,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="water_temperature",
name="Water temperature",
translation_key="water_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -101,7 +100,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="return_temperature",
name="Return temperature",
translation_key="return_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -109,14 +108,14 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="electricity_consumed",
name="Electricity consumed",
translation_key="electricity_consumed",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_produced",
name="Electricity produced",
translation_key="electricity_produced",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
@ -124,28 +123,28 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="electricity_consumed_interval",
name="Electricity consumed interval",
translation_key="electricity_consumed_interval",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
),
SensorEntityDescription(
key="electricity_consumed_peak_interval",
name="Electricity consumed peak interval",
translation_key="electricity_consumed_peak_interval",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
),
SensorEntityDescription(
key="electricity_consumed_off_peak_interval",
name="Electricity consumed off peak interval",
translation_key="electricity_consumed_off_peak_interval",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
),
SensorEntityDescription(
key="electricity_produced_interval",
name="Electricity produced interval",
translation_key="electricity_produced_interval",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
@ -153,133 +152,133 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="electricity_produced_peak_interval",
name="Electricity produced peak interval",
translation_key="electricity_produced_peak_interval",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
),
SensorEntityDescription(
key="electricity_produced_off_peak_interval",
name="Electricity produced off peak interval",
translation_key="electricity_produced_off_peak_interval",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
),
SensorEntityDescription(
key="electricity_consumed_point",
name="Electricity consumed point",
translation_key="electricity_consumed_point",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_consumed_off_peak_point",
name="Electricity consumed off peak point",
translation_key="electricity_consumed_off_peak_point",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_consumed_peak_point",
name="Electricity consumed peak point",
translation_key="electricity_consumed_peak_point",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_consumed_off_peak_cumulative",
name="Electricity consumed off peak cumulative",
translation_key="electricity_consumed_off_peak_cumulative",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
SensorEntityDescription(
key="electricity_consumed_peak_cumulative",
name="Electricity consumed peak cumulative",
translation_key="electricity_consumed_peak_cumulative",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
SensorEntityDescription(
key="electricity_produced_point",
name="Electricity produced point",
translation_key="electricity_produced_point",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_produced_off_peak_point",
name="Electricity produced off peak point",
translation_key="electricity_produced_off_peak_point",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_produced_peak_point",
name="Electricity produced peak point",
translation_key="electricity_produced_peak_point",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_produced_off_peak_cumulative",
name="Electricity produced off peak cumulative",
translation_key="electricity_produced_off_peak_cumulative",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
SensorEntityDescription(
key="electricity_produced_peak_cumulative",
name="Electricity produced peak cumulative",
translation_key="electricity_produced_peak_cumulative",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
SensorEntityDescription(
key="electricity_phase_one_consumed",
name="Electricity phase one consumed",
translation_key="electricity_phase_one_consumed",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_phase_two_consumed",
name="Electricity phase two consumed",
translation_key="electricity_phase_two_consumed",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_phase_three_consumed",
name="Electricity phase three consumed",
translation_key="electricity_phase_three_consumed",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_phase_one_produced",
name="Electricity phase one produced",
translation_key="electricity_phase_one_produced",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_phase_two_produced",
name="Electricity phase two produced",
translation_key="electricity_phase_two_produced",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="electricity_phase_three_produced",
name="Electricity phase three produced",
translation_key="electricity_phase_three_produced",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="voltage_phase_one",
name="Voltage phase one",
translation_key="voltage_phase_one",
device_class=SensorDeviceClass.VOLTAGE,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
@ -287,7 +286,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="voltage_phase_two",
name="Voltage phase two",
translation_key="voltage_phase_two",
device_class=SensorDeviceClass.VOLTAGE,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
@ -295,7 +294,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="voltage_phase_three",
name="Voltage phase three",
translation_key="voltage_phase_three",
device_class=SensorDeviceClass.VOLTAGE,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
state_class=SensorStateClass.MEASUREMENT,
@ -303,35 +302,34 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="gas_consumed_interval",
name="Gas consumed interval",
translation_key="gas_consumed_interval",
icon="mdi:meter-gas",
native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="gas_consumed_cumulative",
name="Gas consumed cumulative",
translation_key="gas_consumed_cumulative",
native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
device_class=SensorDeviceClass.GAS,
state_class=SensorStateClass.TOTAL,
),
SensorEntityDescription(
key="net_electricity_point",
name="Net electricity point",
translation_key="net_electricity_point",
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="net_electricity_cumulative",
name="Net electricity cumulative",
translation_key="net_electricity_cumulative",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL,
),
SensorEntityDescription(
key="battery",
name="Battery",
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY,
entity_category=EntityCategory.DIAGNOSTIC,
@ -339,7 +337,6 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="illuminance",
name="Illuminance",
native_unit_of_measurement=LIGHT_LUX,
device_class=SensorDeviceClass.ILLUMINANCE,
state_class=SensorStateClass.MEASUREMENT,
@ -347,7 +344,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="modulation_level",
name="Modulation level",
translation_key="modulation_level",
icon="mdi:percent",
native_unit_of_measurement=PERCENTAGE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -355,7 +352,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="valve_position",
name="Valve position",
translation_key="valve_position",
icon="mdi:valve",
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=PERCENTAGE,
@ -363,7 +360,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="water_pressure",
name="Water pressure",
translation_key="water_pressure",
native_unit_of_measurement=UnitOfPressure.BAR,
device_class=SensorDeviceClass.PRESSURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -371,14 +368,13 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="humidity",
name="Relative humidity",
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="dhw_temperature",
name="DHW temperature",
translation_key="dhw_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -386,7 +382,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="domestic_hot_water_setpoint",
name="DHW setpoint",
translation_key="domestic_hot_water_setpoint",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,
@ -394,7 +390,7 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="maximum_boiler_temperature",
name="Maximum boiler temperature",
translation_key="maximum_boiler_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
entity_category=EntityCategory.DIAGNOSTIC,

View File

@ -102,6 +102,146 @@
"name": "Thermostat schedule"
}
},
"sensor": {
"setpoint": {
"name": "Setpoint"
},
"cooling_setpoint": {
"name": "Cooling setpoint"
},
"heating_setpoint": {
"name": "Heating setpoint"
},
"intended_boiler_temperature": {
"name": "Intended boiler temperature"
},
"temperature_difference": {
"name": "Temperature difference"
},
"outdoor_temperature": {
"name": "Outdoor temperature"
},
"outdoor_air_temperature": {
"name": "Outdoor air temperature"
},
"water_temperature": {
"name": "Water temperature"
},
"return_temperature": {
"name": "Return temperature"
},
"electricity_consumed": {
"name": "Electricity consumed"
},
"electricity_produced": {
"name": "Electricity produced"
},
"electricity_consumed_interval": {
"name": "Electricity consumed interval"
},
"electricity_consumed_peak_interval": {
"name": "Electricity consumed peak interval"
},
"electricity_consumed_off_peak_interval": {
"name": "Electricity consumed off peak interval"
},
"electricity_produced_interval": {
"name": "Electricity produced interval"
},
"electricity_produced_peak_interval": {
"name": "Electricity produced peak interval"
},
"electricity_produced_off_peak_interval": {
"name": "Electricity produced off peak interval"
},
"electricity_consumed_point": {
"name": "Electricity consumed point"
},
"electricity_consumed_off_peak_point": {
"name": "Electricity consumed off peak point"
},
"electricity_consumed_peak_point": {
"name": "Electricity consumed peak point"
},
"electricity_consumed_off_peak_cumulative": {
"name": "Electricity consumed off peak cumulative"
},
"electricity_consumed_peak_cumulative": {
"name": "Electricity consumed peak cumulative"
},
"electricity_produced_point": {
"name": "Electricity produced point"
},
"electricity_produced_off_peak_point": {
"name": "Electricity produced off peak point"
},
"electricity_produced_peak_point": {
"name": "Electricity produced peak point"
},
"electricity_produced_off_peak_cumulative": {
"name": "Electricity produced off peak cumulative"
},
"electricity_produced_peak_cumulative": {
"name": "Electricity produced peak cumulative"
},
"electricity_phase_one_consumed": {
"name": "Electricity phase one consumed"
},
"electricity_phase_two_consumed": {
"name": "Electricity phase two consumed"
},
"electricity_phase_three_consumed": {
"name": "Electricity phase three consumed"
},
"electricity_phase_one_produced": {
"name": "Electricity phase one produced"
},
"electricity_phase_two_produced": {
"name": "Electricity phase two produced"
},
"electricity_phase_three_produced": {
"name": "Electricity phase three produced"
},
"voltage_phase_one": {
"name": "Voltage phase one"
},
"voltage_phase_two": {
"name": "Voltage phase two"
},
"voltage_phase_three": {
"name": "Voltage phase three"
},
"gas_consumed_interval": {
"name": "Gas consumed interval"
},
"gas_consumed_cumulative": {
"name": "Gas consumed cumulative"
},
"net_electricity_point": {
"name": "Net electricity point"
},
"net_electricity_cumulative": {
"name": "Net electricity cumulative"
},
"modulation_level": {
"name": "Modulation level"
},
"valve_position": {
"name": "Valve position"
},
"water_pressure": {
"name": "Water pressure"
},
"dhw_temperature": {
"name": "DHW temperature"
},
"domestic_hot_water_setpoint": {
"name": "DHW setpoint"
},
"maximum_boiler_temperature": {
"name": "Maximum boiler temperature"
}
},
"switch": {
"cooling_ena_switch": {
"name": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::cooling%]"