Normalize device names in set_lights

This commit is contained in:
Fabio Manganiello 2022-11-02 23:32:21 +01:00
parent d5f8d55b4b
commit 5ca3c06f96
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

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