Add entity translations to Daikin (#95181)
This commit is contained in:
parent
b39f7d6a71
commit
d935c18f38
2 changed files with 40 additions and 10 deletions
|
@ -55,7 +55,7 @@ class DaikinSensorEntityDescription(SensorEntityDescription, DaikinRequiredKeysM
|
||||||
SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_INSIDE_TEMPERATURE,
|
key=ATTR_INSIDE_TEMPERATURE,
|
||||||
name="Inside temperature",
|
translation_key="inside_temperature",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
@ -63,7 +63,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_OUTSIDE_TEMPERATURE,
|
key=ATTR_OUTSIDE_TEMPERATURE,
|
||||||
name="Outside temperature",
|
translation_key="outside_temperature",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
@ -71,7 +71,6 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_HUMIDITY,
|
key=ATTR_HUMIDITY,
|
||||||
name="Humidity",
|
|
||||||
device_class=SensorDeviceClass.HUMIDITY,
|
device_class=SensorDeviceClass.HUMIDITY,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
@ -79,7 +78,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_TARGET_HUMIDITY,
|
key=ATTR_TARGET_HUMIDITY,
|
||||||
name="Target humidity",
|
translation_key="target_humidity",
|
||||||
device_class=SensorDeviceClass.HUMIDITY,
|
device_class=SensorDeviceClass.HUMIDITY,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
@ -87,7 +86,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_TOTAL_POWER,
|
key=ATTR_TOTAL_POWER,
|
||||||
name="Compressor estimated power consumption",
|
translation_key="compressor_estimated_power_consumption",
|
||||||
device_class=SensorDeviceClass.POWER,
|
device_class=SensorDeviceClass.POWER,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
||||||
|
@ -95,7 +94,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_COOL_ENERGY,
|
key=ATTR_COOL_ENERGY,
|
||||||
name="Cool energy consumption",
|
translation_key="cool_energy_consumption",
|
||||||
icon="mdi:snowflake",
|
icon="mdi:snowflake",
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
|
@ -104,7 +103,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_HEAT_ENERGY,
|
key=ATTR_HEAT_ENERGY,
|
||||||
name="Heat energy consumption",
|
translation_key="heat_energy_consumption",
|
||||||
icon="mdi:fire",
|
icon="mdi:fire",
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
|
@ -113,7 +112,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_ENERGY_TODAY,
|
key=ATTR_ENERGY_TODAY,
|
||||||
name="Energy consumption",
|
translation_key="energy_consumption",
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
|
@ -121,7 +120,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_COMPRESSOR_FREQUENCY,
|
key=ATTR_COMPRESSOR_FREQUENCY,
|
||||||
name="Compressor frequency",
|
translation_key="compressor_frequency",
|
||||||
icon="mdi:fan",
|
icon="mdi:fan",
|
||||||
device_class=SensorDeviceClass.FREQUENCY,
|
device_class=SensorDeviceClass.FREQUENCY,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -131,7 +130,7 @@ SENSOR_TYPES: tuple[DaikinSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
DaikinSensorEntityDescription(
|
DaikinSensorEntityDescription(
|
||||||
key=ATTR_TOTAL_ENERGY_TODAY,
|
key=ATTR_TOTAL_ENERGY_TODAY,
|
||||||
name="Compressor energy consumption",
|
translation_key="compressor_energy_consumption",
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
|
|
|
@ -21,5 +21,36 @@
|
||||||
"api_password": "Invalid authentication, use either API Key or Password.",
|
"api_password": "Invalid authentication, use either API Key or Password.",
|
||||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
|
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"inside_temperature": {
|
||||||
|
"name": "Inside temperature"
|
||||||
|
},
|
||||||
|
"outside_temperature": {
|
||||||
|
"name": "Outside temperature"
|
||||||
|
},
|
||||||
|
"target_humidity": {
|
||||||
|
"name": "Target humidity"
|
||||||
|
},
|
||||||
|
"compressor_estimated_power_consumption": {
|
||||||
|
"name": "Compressor estimated power consumption"
|
||||||
|
},
|
||||||
|
"cool_energy_consumption": {
|
||||||
|
"name": "Cool energy consumption"
|
||||||
|
},
|
||||||
|
"heat_energy_consumption": {
|
||||||
|
"name": "Heat energy consumption"
|
||||||
|
},
|
||||||
|
"energy_consumption": {
|
||||||
|
"name": "Energy consumption"
|
||||||
|
},
|
||||||
|
"compressor_frequency": {
|
||||||
|
"name": "Compressor frequency"
|
||||||
|
},
|
||||||
|
"compressor_energy_consumption": {
|
||||||
|
"name": "Compressor energy consumption"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue