Add entity translations to Vallox (#96495)
parent
c94c7fae1b
commit
e29598ecaa
|
@ -304,6 +304,8 @@ class ValloxServiceHandler:
|
||||||
class ValloxEntity(CoordinatorEntity[ValloxDataUpdateCoordinator]):
|
class ValloxEntity(CoordinatorEntity[ValloxDataUpdateCoordinator]):
|
||||||
"""Representation of a Vallox entity."""
|
"""Representation of a Vallox entity."""
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
|
||||||
def __init__(self, name: str, coordinator: ValloxDataUpdateCoordinator) -> None:
|
def __init__(self, name: str, coordinator: ValloxDataUpdateCoordinator) -> None:
|
||||||
"""Initialize a Vallox entity."""
|
"""Initialize a Vallox entity."""
|
||||||
super().__init__(coordinator)
|
super().__init__(coordinator)
|
||||||
|
|
|
@ -21,7 +21,6 @@ class ValloxBinarySensorEntity(ValloxEntity, BinarySensorEntity):
|
||||||
|
|
||||||
entity_description: ValloxBinarySensorEntityDescription
|
entity_description: ValloxBinarySensorEntityDescription
|
||||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||||
_attr_has_entity_name = True
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -59,7 +58,7 @@ class ValloxBinarySensorEntityDescription(
|
||||||
BINARY_SENSOR_ENTITIES: tuple[ValloxBinarySensorEntityDescription, ...] = (
|
BINARY_SENSOR_ENTITIES: tuple[ValloxBinarySensorEntityDescription, ...] = (
|
||||||
ValloxBinarySensorEntityDescription(
|
ValloxBinarySensorEntityDescription(
|
||||||
key="post_heater",
|
key="post_heater",
|
||||||
name="Post heater",
|
translation_key="post_heater",
|
||||||
icon="mdi:radiator",
|
icon="mdi:radiator",
|
||||||
metric_key="A_CYC_IO_HEATER",
|
metric_key="A_CYC_IO_HEATER",
|
||||||
),
|
),
|
||||||
|
|
|
@ -83,7 +83,6 @@ async def async_setup_entry(
|
||||||
class ValloxFanEntity(ValloxEntity, FanEntity):
|
class ValloxFanEntity(ValloxEntity, FanEntity):
|
||||||
"""Representation of the fan."""
|
"""Representation of the fan."""
|
||||||
|
|
||||||
_attr_has_entity_name = True
|
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
_attr_supported_features = FanEntityFeature.PRESET_MODE | FanEntityFeature.SET_SPEED
|
_attr_supported_features = FanEntityFeature.PRESET_MODE | FanEntityFeature.SET_SPEED
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ class ValloxNumberEntity(ValloxEntity, NumberEntity):
|
||||||
"""Representation of a Vallox number entity."""
|
"""Representation of a Vallox number entity."""
|
||||||
|
|
||||||
entity_description: ValloxNumberEntityDescription
|
entity_description: ValloxNumberEntityDescription
|
||||||
_attr_has_entity_name = True
|
|
||||||
_attr_entity_category = EntityCategory.CONFIG
|
_attr_entity_category = EntityCategory.CONFIG
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -76,7 +75,7 @@ class ValloxNumberEntityDescription(NumberEntityDescription, ValloxMetricMixin):
|
||||||
NUMBER_ENTITIES: tuple[ValloxNumberEntityDescription, ...] = (
|
NUMBER_ENTITIES: tuple[ValloxNumberEntityDescription, ...] = (
|
||||||
ValloxNumberEntityDescription(
|
ValloxNumberEntityDescription(
|
||||||
key="supply_air_target_home",
|
key="supply_air_target_home",
|
||||||
name="Supply air temperature (Home)",
|
translation_key="supply_air_target_home",
|
||||||
metric_key="A_CYC_HOME_AIR_TEMP_TARGET",
|
metric_key="A_CYC_HOME_AIR_TEMP_TARGET",
|
||||||
device_class=NumberDeviceClass.TEMPERATURE,
|
device_class=NumberDeviceClass.TEMPERATURE,
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
@ -87,7 +86,7 @@ NUMBER_ENTITIES: tuple[ValloxNumberEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxNumberEntityDescription(
|
ValloxNumberEntityDescription(
|
||||||
key="supply_air_target_away",
|
key="supply_air_target_away",
|
||||||
name="Supply air temperature (Away)",
|
translation_key="supply_air_target_away",
|
||||||
metric_key="A_CYC_AWAY_AIR_TEMP_TARGET",
|
metric_key="A_CYC_AWAY_AIR_TEMP_TARGET",
|
||||||
device_class=NumberDeviceClass.TEMPERATURE,
|
device_class=NumberDeviceClass.TEMPERATURE,
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
@ -98,7 +97,7 @@ NUMBER_ENTITIES: tuple[ValloxNumberEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxNumberEntityDescription(
|
ValloxNumberEntityDescription(
|
||||||
key="supply_air_target_boost",
|
key="supply_air_target_boost",
|
||||||
name="Supply air temperature (Boost)",
|
translation_key="supply_air_target_boost",
|
||||||
metric_key="A_CYC_BOOST_AIR_TEMP_TARGET",
|
metric_key="A_CYC_BOOST_AIR_TEMP_TARGET",
|
||||||
device_class=NumberDeviceClass.TEMPERATURE,
|
device_class=NumberDeviceClass.TEMPERATURE,
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
|
|
|
@ -38,7 +38,6 @@ class ValloxSensorEntity(ValloxEntity, SensorEntity):
|
||||||
|
|
||||||
entity_description: ValloxSensorEntityDescription
|
entity_description: ValloxSensorEntityDescription
|
||||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||||
_attr_has_entity_name = True
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -138,13 +137,13 @@ class ValloxSensorEntityDescription(SensorEntityDescription):
|
||||||
SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="current_profile",
|
key="current_profile",
|
||||||
name="Current profile",
|
translation_key="current_profile",
|
||||||
icon="mdi:gauge",
|
icon="mdi:gauge",
|
||||||
entity_type=ValloxProfileSensor,
|
entity_type=ValloxProfileSensor,
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="fan_speed",
|
key="fan_speed",
|
||||||
name="Fan speed",
|
translation_key="fan_speed",
|
||||||
metric_key="A_CYC_FAN_SPEED",
|
metric_key="A_CYC_FAN_SPEED",
|
||||||
icon="mdi:fan",
|
icon="mdi:fan",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -153,7 +152,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="extract_fan_speed",
|
key="extract_fan_speed",
|
||||||
name="Extract fan speed",
|
translation_key="extract_fan_speed",
|
||||||
metric_key="A_CYC_EXTR_FAN_SPEED",
|
metric_key="A_CYC_EXTR_FAN_SPEED",
|
||||||
icon="mdi:fan",
|
icon="mdi:fan",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -163,7 +162,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="supply_fan_speed",
|
key="supply_fan_speed",
|
||||||
name="Supply fan speed",
|
translation_key="supply_fan_speed",
|
||||||
metric_key="A_CYC_SUPP_FAN_SPEED",
|
metric_key="A_CYC_SUPP_FAN_SPEED",
|
||||||
icon="mdi:fan",
|
icon="mdi:fan",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -173,20 +172,20 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="remaining_time_for_filter",
|
key="remaining_time_for_filter",
|
||||||
name="Remaining time for filter",
|
translation_key="remaining_time_for_filter",
|
||||||
device_class=SensorDeviceClass.TIMESTAMP,
|
device_class=SensorDeviceClass.TIMESTAMP,
|
||||||
entity_type=ValloxFilterRemainingSensor,
|
entity_type=ValloxFilterRemainingSensor,
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="cell_state",
|
key="cell_state",
|
||||||
name="Cell state",
|
translation_key="cell_state",
|
||||||
icon="mdi:swap-horizontal-bold",
|
icon="mdi:swap-horizontal-bold",
|
||||||
metric_key="A_CYC_CELL_STATE",
|
metric_key="A_CYC_CELL_STATE",
|
||||||
entity_type=ValloxCellStateSensor,
|
entity_type=ValloxCellStateSensor,
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="extract_air",
|
key="extract_air",
|
||||||
name="Extract air",
|
translation_key="extract_air",
|
||||||
metric_key="A_CYC_TEMP_EXTRACT_AIR",
|
metric_key="A_CYC_TEMP_EXTRACT_AIR",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -194,7 +193,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="exhaust_air",
|
key="exhaust_air",
|
||||||
name="Exhaust air",
|
translation_key="exhaust_air",
|
||||||
metric_key="A_CYC_TEMP_EXHAUST_AIR",
|
metric_key="A_CYC_TEMP_EXHAUST_AIR",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -202,7 +201,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="outdoor_air",
|
key="outdoor_air",
|
||||||
name="Outdoor air",
|
translation_key="outdoor_air",
|
||||||
metric_key="A_CYC_TEMP_OUTDOOR_AIR",
|
metric_key="A_CYC_TEMP_OUTDOOR_AIR",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -210,7 +209,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="supply_air",
|
key="supply_air",
|
||||||
name="Supply air",
|
translation_key="supply_air",
|
||||||
metric_key="A_CYC_TEMP_SUPPLY_AIR",
|
metric_key="A_CYC_TEMP_SUPPLY_AIR",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -218,7 +217,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="supply_cell_air",
|
key="supply_cell_air",
|
||||||
name="Supply cell air",
|
translation_key="supply_cell_air",
|
||||||
metric_key="A_CYC_TEMP_SUPPLY_CELL_AIR",
|
metric_key="A_CYC_TEMP_SUPPLY_CELL_AIR",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -226,7 +225,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="optional_air",
|
key="optional_air",
|
||||||
name="Optional air",
|
translation_key="optional_air",
|
||||||
metric_key="A_CYC_TEMP_OPTIONAL",
|
metric_key="A_CYC_TEMP_OPTIONAL",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -235,7 +234,6 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="humidity",
|
key="humidity",
|
||||||
name="Humidity",
|
|
||||||
metric_key="A_CYC_RH_VALUE",
|
metric_key="A_CYC_RH_VALUE",
|
||||||
device_class=SensorDeviceClass.HUMIDITY,
|
device_class=SensorDeviceClass.HUMIDITY,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -243,7 +241,7 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="efficiency",
|
key="efficiency",
|
||||||
name="Efficiency",
|
translation_key="efficiency",
|
||||||
metric_key="A_CYC_EXTRACT_EFFICIENCY",
|
metric_key="A_CYC_EXTRACT_EFFICIENCY",
|
||||||
icon="mdi:gauge",
|
icon="mdi:gauge",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
@ -253,7 +251,6 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = (
|
||||||
),
|
),
|
||||||
ValloxSensorEntityDescription(
|
ValloxSensorEntityDescription(
|
||||||
key="co2",
|
key="co2",
|
||||||
name="CO2",
|
|
||||||
metric_key="A_CYC_CO2_VALUE",
|
metric_key="A_CYC_CO2_VALUE",
|
||||||
device_class=SensorDeviceClass.CO2,
|
device_class=SensorDeviceClass.CO2,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
|
|
@ -19,6 +19,70 @@
|
||||||
"unknown": "[%key:common::config_flow::error::unknown%]"
|
"unknown": "[%key:common::config_flow::error::unknown%]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"post_heater": {
|
||||||
|
"name": "Post heater"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"supply_air_target_home": {
|
||||||
|
"name": "Supply air temperature (Home)"
|
||||||
|
},
|
||||||
|
"supply_air_target_away": {
|
||||||
|
"name": "Supply air temperature (Away)"
|
||||||
|
},
|
||||||
|
"supply_air_target_boost": {
|
||||||
|
"name": "Supply air temperature (Boost)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sensor": {
|
||||||
|
"current_profile": {
|
||||||
|
"name": "Current profile"
|
||||||
|
},
|
||||||
|
"fan_speed": {
|
||||||
|
"name": "Fan speed"
|
||||||
|
},
|
||||||
|
"extract_fan_speed": {
|
||||||
|
"name": "Extract fan speed"
|
||||||
|
},
|
||||||
|
"supply_fan_speed": {
|
||||||
|
"name": "Supply fan speed"
|
||||||
|
},
|
||||||
|
"remaining_time_for_filter": {
|
||||||
|
"name": "Remaining time for filter"
|
||||||
|
},
|
||||||
|
"cell_state": {
|
||||||
|
"name": "Cell state"
|
||||||
|
},
|
||||||
|
"extract_air": {
|
||||||
|
"name": "Extract air"
|
||||||
|
},
|
||||||
|
"exhaust_air": {
|
||||||
|
"name": "Exhaust air"
|
||||||
|
},
|
||||||
|
"outdoor_air": {
|
||||||
|
"name": "Outdoor air"
|
||||||
|
},
|
||||||
|
"supply_air": {
|
||||||
|
"name": "Supply air"
|
||||||
|
},
|
||||||
|
"supply_cell_air": {
|
||||||
|
"name": "Supply cell air"
|
||||||
|
},
|
||||||
|
"optional_air": {
|
||||||
|
"name": "Optional air"
|
||||||
|
},
|
||||||
|
"efficiency": {
|
||||||
|
"name": "Efficiency"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"bypass_locked": {
|
||||||
|
"name": "Bypass locked"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"set_profile_fan_speed_home": {
|
"set_profile_fan_speed_home": {
|
||||||
"name": "Set profile fan speed home",
|
"name": "Set profile fan speed home",
|
||||||
|
|
|
@ -21,7 +21,6 @@ class ValloxSwitchEntity(ValloxEntity, SwitchEntity):
|
||||||
|
|
||||||
entity_description: ValloxSwitchEntityDescription
|
entity_description: ValloxSwitchEntityDescription
|
||||||
_attr_entity_category = EntityCategory.CONFIG
|
_attr_entity_category = EntityCategory.CONFIG
|
||||||
_attr_has_entity_name = True
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
@ -79,7 +78,7 @@ class ValloxSwitchEntityDescription(SwitchEntityDescription, ValloxMetricKeyMixi
|
||||||
SWITCH_ENTITIES: tuple[ValloxSwitchEntityDescription, ...] = (
|
SWITCH_ENTITIES: tuple[ValloxSwitchEntityDescription, ...] = (
|
||||||
ValloxSwitchEntityDescription(
|
ValloxSwitchEntityDescription(
|
||||||
key="bypass_locked",
|
key="bypass_locked",
|
||||||
name="Bypass locked",
|
translation_key="bypass_locked",
|
||||||
icon="mdi:arrow-horizontal-lock",
|
icon="mdi:arrow-horizontal-lock",
|
||||||
metric_key="A_CYC_BYPASS_LOCKED",
|
metric_key="A_CYC_BYPASS_LOCKED",
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue