diff --git a/broadlink/__init__.py b/broadlink/__init__.py index 3e749bf0..1abc47ed 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -44,6 +44,7 @@ 0x756F: (sp4, "MCB1", "Broadlink"), 0x7579: (sp4, "SP4L-EU", "Broadlink"), 0x7583: (sp4, "SP mini 3", "Broadlink"), + 0x7587: (sp4, "SP4L-UK", "Broadlink"), 0x7D11: (sp4, "SP mini 3", "Broadlink"), 0xA56A: (sp4, "MCB1", "Broadlink"), 0xA589: (sp4, "SP4L-UK", "Broadlink"), diff --git a/broadlink/switch.py b/broadlink/switch.py index 775b7580..2286cd9b 100644 --- a/broadlink/switch.py +++ b/broadlink/switch.py @@ -298,12 +298,12 @@ def set_state( def check_power(self) -> bool: """Return the power state of the device.""" state = self.get_state() - return state["pwr"] + return bool(state["pwr"]) def check_nightlight(self) -> bool: """Return the state of the night light.""" state = self.get_state() - return state["ntlight"] + return bool(state["ntlight"]) def get_state(self) -> dict: """Get full state of device."""