From d5f8d55b4b231517ac15b2706eb95a421817d0f2 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 2 Nov 2022 23:07:12 +0100 Subject: [PATCH] Fixed zigbee.mqtt light entity conversion --- platypush/plugins/zigbee/mqtt/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/platypush/plugins/zigbee/mqtt/__init__.py b/platypush/plugins/zigbee/mqtt/__init__.py index a7a89b3e40..4faaf9a136 100644 --- a/platypush/plugins/zigbee/mqtt/__init__.py +++ b/platypush/plugins/zigbee/mqtt/__init__.py @@ -201,7 +201,7 @@ class ZigbeeMqttPlugin(MqttPlugin): # lgtm [py/missing-call-to-init] if light_info: compatible_entities.append( Light( - id=f'{dev["ieee_address"]}|light', + id=f'{dev["ieee_address"]}:light', name=dev.get('friendly_name'), on=dev.get('state', {}).get('state') == switch_info.get('value_on'), @@ -214,14 +214,14 @@ class ZigbeeMqttPlugin(MqttPlugin): # lgtm [py/missing-call-to-init] saturation_min=light_info.get('saturation_min'), saturation_max=light_info.get('saturation_max'), brightness=( - dev.get('state', {}) - .get('color', {}) - .get(light_info.get('brightness_name', 'brightness')) + dev.get('state', {}).get( + light_info.get('brightness_name', 'brightness') + ) ), temperature=( - dev.get('state', {}) - .get('color', {}) - .get(light_info.get('temperature_name', 'temperature')) + dev.get('state', {}).get( + light_info.get('temperature_name', 'temperature') + ) ), hue=( dev.get('state', {})