From b6343d91219780da2ab83e49110b01053eeac7a5 Mon Sep 17 00:00:00 2001 From: Emily Love Watson Date: Wed, 15 Jan 2025 03:35:09 -0600 Subject: [PATCH] Child lock icons (#188) * Update icons.json * Update switch.py --- custom_components/ha_blueair/icons.json | 8 ++++++++ custom_components/ha_blueair/switch.py | 1 + 2 files changed, 9 insertions(+) diff --git a/custom_components/ha_blueair/icons.json b/custom_components/ha_blueair/icons.json index 8875828..bee5cb7 100644 --- a/custom_components/ha_blueair/icons.json +++ b/custom_components/ha_blueair/icons.json @@ -11,6 +11,14 @@ } } } + }, + "switch": { + "child_lock": { + "default": "mdi:lock", + "state": { + "off": "mdi:lock-open-variant" + } + } } } } diff --git a/custom_components/ha_blueair/switch.py b/custom_components/ha_blueair/switch.py index bfae20f..5fac929 100644 --- a/custom_components/ha_blueair/switch.py +++ b/custom_components/ha_blueair/switch.py @@ -48,6 +48,7 @@ class BlueairChildLockSwitchEntity(BlueairSwitchEntity): name="Child Lock", device_class=SwitchDeviceClass.SWITCH, ) + _attr_translation_key = "child_lock" class BlueairGermShieldSwitchEntity(BlueairSwitchEntity):