Normalize the light devices' IEEE addresses before retrieving the associated devices

This commit is contained in:
Fabio Manganiello 2023-01-13 23:28:12 +01:00
parent 22a566a88b
commit 68497e6388
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -1814,6 +1814,7 @@ class ZigbeeMqttPlugin(MqttPlugin): # lgtm [py/missing-call-to-init]
Set the state for one or more Zigbee lights. Set the state for one or more Zigbee lights.
""" """
lights = [lights] if isinstance(lights, str) else lights lights = [lights] if isinstance(lights, str) else lights
lights = [str(self._ieee_address(light)) for light in lights]
devices = [self._get_device_info(light) for light in lights] devices = [self._get_device_info(light) for light in lights]
for i, dev in enumerate(devices): for i, dev in enumerate(devices):