mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Add icon translations to RDW (#112203)
* Add icon translations to RDW * Add icon translations to RDW
This commit is contained in:
parent
161d31d789
commit
926159ab9a
@ -34,7 +34,6 @@ BINARY_SENSORS: tuple[RDWBinarySensorEntityDescription, ...] = (
|
|||||||
RDWBinarySensorEntityDescription(
|
RDWBinarySensorEntityDescription(
|
||||||
key="liability_insured",
|
key="liability_insured",
|
||||||
translation_key="liability_insured",
|
translation_key="liability_insured",
|
||||||
icon="mdi:shield-car",
|
|
||||||
is_on_fn=lambda vehicle: vehicle.liability_insured,
|
is_on_fn=lambda vehicle: vehicle.liability_insured,
|
||||||
),
|
),
|
||||||
RDWBinarySensorEntityDescription(
|
RDWBinarySensorEntityDescription(
|
||||||
|
9
homeassistant/components/rdw/icons.json
Normal file
9
homeassistant/components/rdw/icons.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"liability_insured": {
|
||||||
|
"default": "mdi:shield-car"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -23,7 +23,6 @@ async def test_vehicle_binary_sensors(
|
|||||||
assert entry.unique_id == "11ZKZ3_liability_insured"
|
assert entry.unique_id == "11ZKZ3_liability_insured"
|
||||||
assert state.state == "off"
|
assert state.state == "off"
|
||||||
assert state.attributes.get(ATTR_FRIENDLY_NAME) == "Skoda 11ZKZ3 Liability insured"
|
assert state.attributes.get(ATTR_FRIENDLY_NAME) == "Skoda 11ZKZ3 Liability insured"
|
||||||
assert state.attributes.get(ATTR_ICON) == "mdi:shield-car"
|
|
||||||
assert ATTR_DEVICE_CLASS not in state.attributes
|
assert ATTR_DEVICE_CLASS not in state.attributes
|
||||||
|
|
||||||
state = hass.states.get("binary_sensor.skoda_11zkz3_pending_recall")
|
state = hass.states.get("binary_sensor.skoda_11zkz3_pending_recall")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user