Add icon translations to Sensibo (#112222)
* Add icon translations to Sensibo * Add icon translations to Sensibo * Add icon translations to Sensibo
This commit is contained in:
parent
58d0420a6b
commit
91b2dd4b83
8 changed files with 54 additions and 19 deletions
|
@ -70,13 +70,11 @@ MOTION_SENSOR_TYPES: tuple[SensiboMotionBinarySensorEntityDescription, ...] = (
|
|||
key="is_main_sensor",
|
||||
translation_key="is_main_sensor",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:connection",
|
||||
value_fn=lambda data: data.is_main_sensor,
|
||||
),
|
||||
SensiboMotionBinarySensorEntityDescription(
|
||||
key="motion",
|
||||
device_class=BinarySensorDeviceClass.MOTION,
|
||||
icon="mdi:motion-sensor",
|
||||
value_fn=lambda data: data.motion,
|
||||
),
|
||||
)
|
||||
|
@ -86,7 +84,6 @@ MOTION_DEVICE_SENSOR_TYPES: tuple[SensiboDeviceBinarySensorEntityDescription, ..
|
|||
key="room_occupied",
|
||||
translation_key="room_occupied",
|
||||
device_class=BinarySensorDeviceClass.MOTION,
|
||||
icon="mdi:motion-sensor",
|
||||
value_fn=lambda data: data.room_occupied,
|
||||
),
|
||||
)
|
||||
|
|
|
@ -34,7 +34,6 @@ class SensiboButtonEntityDescription(
|
|||
DEVICE_BUTTON_TYPES = SensiboButtonEntityDescription(
|
||||
key="reset_filter",
|
||||
translation_key="reset_filter",
|
||||
icon="mdi:air-filter",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
data_key="filter_clean",
|
||||
)
|
||||
|
|
54
homeassistant/components/sensibo/icons.json
Normal file
54
homeassistant/components/sensibo/icons.json
Normal file
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"is_main_sensor": {
|
||||
"default": "mdi:connection"
|
||||
}
|
||||
},
|
||||
"button": {
|
||||
"reset_filter": {
|
||||
"default": "mdi:air-filter"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"horizontalswing": {
|
||||
"default": "mdi:air-conditioner"
|
||||
},
|
||||
"light": {
|
||||
"default": "mdi:flashlight"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"filter_last_reset": {
|
||||
"default": "mdi:timer"
|
||||
},
|
||||
"battery_voltage": {
|
||||
"default": "mdi:battery"
|
||||
},
|
||||
"sensitivity": {
|
||||
"default": "mdi:air-filter"
|
||||
},
|
||||
"timer_time": {
|
||||
"default": "mdi:timer"
|
||||
},
|
||||
"airq_tvoc": {
|
||||
"default": "mdi:air-filter"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"timer_on_switch": {
|
||||
"default": "mdi:timer"
|
||||
},
|
||||
"climate_react_switch": {
|
||||
"default": "mdi:wizard-hat"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"assume_state": "mdi:shape-outline",
|
||||
"enable_timer": "mdi:timer-play",
|
||||
"enable_pure_boost": "mdi:air-filter",
|
||||
"full_state": "mdi:shape",
|
||||
"enable_climate_react": "mdi:wizard-hat"
|
||||
}
|
||||
}
|
|
@ -41,7 +41,6 @@ DEVICE_SELECT_TYPES = (
|
|||
SensiboSelectEntityDescription(
|
||||
key="horizontalSwing",
|
||||
data_key="horizontal_swing_mode",
|
||||
icon="mdi:air-conditioner",
|
||||
value_fn=lambda data: data.horizontal_swing_mode,
|
||||
options_fn=lambda data: data.horizontal_swing_modes,
|
||||
translation_key="horizontalswing",
|
||||
|
@ -50,7 +49,6 @@ DEVICE_SELECT_TYPES = (
|
|||
SensiboSelectEntityDescription(
|
||||
key="light",
|
||||
data_key="light_mode",
|
||||
icon="mdi:flashlight",
|
||||
value_fn=lambda data: data.light_mode,
|
||||
options_fn=lambda data: data.light_modes,
|
||||
translation_key="light",
|
||||
|
|
|
@ -69,7 +69,6 @@ FILTER_LAST_RESET_DESCRIPTION = SensiboDeviceSensorEntityDescription(
|
|||
key="filter_last_reset",
|
||||
translation_key="filter_last_reset",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
icon="mdi:timer",
|
||||
value_fn=lambda data: data.filter_last_reset,
|
||||
extra_fn=None,
|
||||
)
|
||||
|
@ -82,7 +81,6 @@ MOTION_SENSOR_TYPES: tuple[SensiboMotionSensorEntityDescription, ...] = (
|
|||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:wifi",
|
||||
value_fn=lambda data: data.rssi,
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
|
@ -93,7 +91,6 @@ MOTION_SENSOR_TYPES: tuple[SensiboMotionSensorEntityDescription, ...] = (
|
|||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:battery",
|
||||
value_fn=lambda data: data.battery_voltage,
|
||||
),
|
||||
SensiboMotionSensorEntityDescription(
|
||||
|
@ -101,7 +98,6 @@ MOTION_SENSOR_TYPES: tuple[SensiboMotionSensorEntityDescription, ...] = (
|
|||
device_class=SensorDeviceClass.HUMIDITY,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:water",
|
||||
value_fn=lambda data: data.humidity,
|
||||
),
|
||||
SensiboMotionSensorEntityDescription(
|
||||
|
@ -109,7 +105,6 @@ MOTION_SENSOR_TYPES: tuple[SensiboMotionSensorEntityDescription, ...] = (
|
|||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:thermometer",
|
||||
value_fn=lambda data: data.temperature,
|
||||
),
|
||||
)
|
||||
|
@ -119,14 +114,12 @@ PURE_SENSOR_TYPES: tuple[SensiboDeviceSensorEntityDescription, ...] = (
|
|||
device_class=SensorDeviceClass.PM25,
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:air-filter",
|
||||
value_fn=lambda data: data.pm25,
|
||||
extra_fn=None,
|
||||
),
|
||||
SensiboDeviceSensorEntityDescription(
|
||||
key="pure_sensitivity",
|
||||
translation_key="sensitivity",
|
||||
icon="mdi:air-filter",
|
||||
value_fn=lambda data: data.pure_sensitivity,
|
||||
extra_fn=None,
|
||||
),
|
||||
|
@ -138,7 +131,6 @@ DEVICE_SENSOR_TYPES: tuple[SensiboDeviceSensorEntityDescription, ...] = (
|
|||
key="timer_time",
|
||||
translation_key="timer_time",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
icon="mdi:timer",
|
||||
value_fn=lambda data: data.timer_time,
|
||||
extra_fn=lambda data: {"id": data.timer_id, "turn_on": data.timer_state_on},
|
||||
),
|
||||
|
@ -188,7 +180,6 @@ AIRQ_SENSOR_TYPES: tuple[SensiboDeviceSensorEntityDescription, ...] = (
|
|||
translation_key="airq_tvoc",
|
||||
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:air-filter",
|
||||
value_fn=lambda data: data.tvoc,
|
||||
extra_fn=None,
|
||||
),
|
||||
|
|
|
@ -47,7 +47,6 @@ DEVICE_SWITCH_TYPES: tuple[SensiboDeviceSwitchEntityDescription, ...] = (
|
|||
key="timer_on_switch",
|
||||
translation_key="timer_on_switch",
|
||||
device_class=SwitchDeviceClass.SWITCH,
|
||||
icon="mdi:timer",
|
||||
value_fn=lambda data: data.timer_on,
|
||||
extra_fn=lambda data: {"id": data.timer_id, "turn_on": data.timer_state_on},
|
||||
command_on="async_turn_on_timer",
|
||||
|
@ -58,7 +57,6 @@ DEVICE_SWITCH_TYPES: tuple[SensiboDeviceSwitchEntityDescription, ...] = (
|
|||
key="climate_react_switch",
|
||||
translation_key="climate_react_switch",
|
||||
device_class=SwitchDeviceClass.SWITCH,
|
||||
icon="mdi:wizard-hat",
|
||||
value_fn=lambda data: data.smart_on,
|
||||
extra_fn=lambda data: {"type": data.smart_type},
|
||||
command_on="async_turn_on_off_smart",
|
||||
|
|
|
@ -43,7 +43,6 @@ DEVICE_SENSOR_TYPES: tuple[SensiboDeviceUpdateEntityDescription, ...] = (
|
|||
key="fw_ver_available",
|
||||
device_class=UpdateDeviceClass.FIRMWARE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:rocket-launch",
|
||||
value_version=lambda data: data.fw_ver,
|
||||
value_available=lambda data: data.fw_ver_available,
|
||||
),
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
ReadOnlyDict({
|
||||
'device_class': 'pm25',
|
||||
'friendly_name': 'Kitchen PM2.5',
|
||||
'icon': 'mdi:air-filter',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': 'µg/m³',
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue