mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add icon translations to myuplink (#111466)
This commit is contained in:
parent
7cdec9aeeb
commit
f95d649f44
@ -20,7 +20,7 @@ CATEGORY_BASED_DESCRIPTIONS: dict[str, dict[str, BinarySensorEntityDescription]]
|
|||||||
"NIBEF": {
|
"NIBEF": {
|
||||||
"43161": BinarySensorEntityDescription(
|
"43161": BinarySensorEntityDescription(
|
||||||
key="elect_add",
|
key="elect_add",
|
||||||
icon="mdi:electric-switch",
|
translation_key="elect_add",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
45
homeassistant/components/myuplink/icons.json
Normal file
45
homeassistant/components/myuplink/icons.json
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"elect_add": {
|
||||||
|
"default": "mdi:electric-switch",
|
||||||
|
"state": {
|
||||||
|
"on": "mdi:electric-switch-closed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"degree_minutes": {
|
||||||
|
"default": "mdi:thermometer-lines"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sensor": {
|
||||||
|
"airflow": {
|
||||||
|
"default": "mdi:weather-windy"
|
||||||
|
},
|
||||||
|
"elect_add": {
|
||||||
|
"default": "mdi:heat-wave"
|
||||||
|
},
|
||||||
|
"fan_mode": {
|
||||||
|
"default": "mdi:fan"
|
||||||
|
},
|
||||||
|
"priority": {
|
||||||
|
"default": "mdi:priority-high"
|
||||||
|
},
|
||||||
|
"status_compressor": {
|
||||||
|
"default": "mdi:heat-pump-outline"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"boost_ventilation": {
|
||||||
|
"default": "mdi:fan-plus"
|
||||||
|
},
|
||||||
|
"temporary_lux": {
|
||||||
|
"default": "mdi:water-alert-outline",
|
||||||
|
"state": {
|
||||||
|
"on": "mdi:water-alert"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -18,7 +18,7 @@ from .helpers import find_matching_platform
|
|||||||
DEVICE_POINT_UNIT_DESCRIPTIONS: dict[str, NumberEntityDescription] = {
|
DEVICE_POINT_UNIT_DESCRIPTIONS: dict[str, NumberEntityDescription] = {
|
||||||
"DM": NumberEntityDescription(
|
"DM": NumberEntityDescription(
|
||||||
key="degree_minutes",
|
key="degree_minutes",
|
||||||
icon="mdi:thermometer-lines",
|
translation_key="degree_minutes",
|
||||||
native_unit_of_measurement="DM",
|
native_unit_of_measurement="DM",
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ CATEGORY_BASED_DESCRIPTIONS: dict[str, dict[str, NumberEntityDescription]] = {
|
|||||||
"NIBEF": {
|
"NIBEF": {
|
||||||
"40940": NumberEntityDescription(
|
"40940": NumberEntityDescription(
|
||||||
key="degree_minutes",
|
key="degree_minutes",
|
||||||
icon="mdi:thermometer-lines",
|
translation_key="degree_minutes",
|
||||||
native_unit_of_measurement="DM",
|
native_unit_of_measurement="DM",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -81,10 +81,10 @@ DEVICE_POINT_UNIT_DESCRIPTIONS: dict[str, SensorEntityDescription] = {
|
|||||||
),
|
),
|
||||||
"m3/h": SensorEntityDescription(
|
"m3/h": SensorEntityDescription(
|
||||||
key="airflow",
|
key="airflow",
|
||||||
|
translation_key="airflow",
|
||||||
device_class=SensorDeviceClass.VOLUME_FLOW_RATE,
|
device_class=SensorDeviceClass.VOLUME_FLOW_RATE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
|
native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
|
||||||
icon="mdi:weather-windy",
|
|
||||||
),
|
),
|
||||||
"s": SensorEntityDescription(
|
"s": SensorEntityDescription(
|
||||||
key="seconds",
|
key="seconds",
|
||||||
@ -101,22 +101,22 @@ CATEGORY_BASED_DESCRIPTIONS: dict[str, dict[str, SensorEntityDescription]] = {
|
|||||||
"NIBEF": {
|
"NIBEF": {
|
||||||
"43108": SensorEntityDescription(
|
"43108": SensorEntityDescription(
|
||||||
key="fan_mode",
|
key="fan_mode",
|
||||||
icon="mdi:fan",
|
translation_key="fan_mode",
|
||||||
),
|
),
|
||||||
"43427": SensorEntityDescription(
|
"43427": SensorEntityDescription(
|
||||||
key="status_compressor",
|
key="status_compressor",
|
||||||
|
translation_key="status_compressor",
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
icon="mdi:heat-pump-outline",
|
|
||||||
),
|
),
|
||||||
"49993": SensorEntityDescription(
|
"49993": SensorEntityDescription(
|
||||||
key="elect_add",
|
key="elect_add",
|
||||||
|
translation_key="elect_add",
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
icon="mdi:heat-wave",
|
|
||||||
),
|
),
|
||||||
"49994": SensorEntityDescription(
|
"49994": SensorEntityDescription(
|
||||||
key="priority",
|
key="priority",
|
||||||
|
translation_key="priority",
|
||||||
device_class=SensorDeviceClass.ENUM,
|
device_class=SensorDeviceClass.ENUM,
|
||||||
icon="mdi:priority-high",
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
"NIBE": {},
|
"NIBE": {},
|
||||||
|
@ -21,7 +21,11 @@ CATEGORY_BASED_DESCRIPTIONS: dict[str, dict[str, SwitchEntityDescription]] = {
|
|||||||
"NIBEF": {
|
"NIBEF": {
|
||||||
"50004": SwitchEntityDescription(
|
"50004": SwitchEntityDescription(
|
||||||
key="temporary_lux",
|
key="temporary_lux",
|
||||||
icon="mdi:water-alert-outline",
|
translation_key="temporary_lux",
|
||||||
|
),
|
||||||
|
"50005": SwitchEntityDescription(
|
||||||
|
key="boost_ventilation",
|
||||||
|
translation_key="boost_ventilation",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,6 @@ async def test_attributes(
|
|||||||
assert state.state == "-875.0"
|
assert state.state == "-875.0"
|
||||||
assert state.attributes == {
|
assert state.attributes == {
|
||||||
"friendly_name": ENTITY_FRIENDLY_NAME,
|
"friendly_name": ENTITY_FRIENDLY_NAME,
|
||||||
"icon": "mdi:thermometer-lines",
|
|
||||||
"min": -3000,
|
"min": -3000,
|
||||||
"max": 3000,
|
"max": 3000,
|
||||||
"mode": "auto",
|
"mode": "auto",
|
||||||
|
@ -47,7 +47,6 @@ async def test_attributes(
|
|||||||
assert state.state == STATE_OFF
|
assert state.state == STATE_OFF
|
||||||
assert state.attributes == {
|
assert state.attributes == {
|
||||||
"friendly_name": ENTITY_FRIENDLY_NAME,
|
"friendly_name": ENTITY_FRIENDLY_NAME,
|
||||||
"icon": "mdi:water-alert-outline",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user