bieniu / ha-shellies-discovery-gen2

Script that adds MQTT discovery support for Shellies Gen2 devices
Apache License 2.0
101 stars 18 forks source link

Help: Shelly Plus i4 added to HA but all states are Unknown #304

Closed iamnikv closed 10 months ago

iamnikv commented 10 months ago

Describe the bug I guess it's probably my fault, however I can't seem to make it work or I am missing something. The shelly plus i4 appears in Home Assistant as an MQTT device, but all of its states are Unknown:

image

The inputs are configured as buttons and I understand that they won't have a state and I have to use a trigger automation for them, but I don't understand why the other sensors are Unknown as well.

Shelly Plus i4 config:

image

Mqtt Explorer:

image

Versions:

Shellies Discovery GEN2 automation:

- id: shellies_announce_gen2
  alias: "Shellies Announce Gen2"
  trigger:
    - platform: homeassistant
      event: start
  variables:
    device_info_payload: "{{ {'id': 1, 'src':'shellies_discovery', 'method':'Shelly.GetConfig'} | to_json }}"
    device_ids: # enter the list of device IDs (MQTT prefixes) here
      - shelly-plusi4-garage-panel
  action:
    - repeat:
        for_each: "{{ device_ids }}"
        sequence:
          - service: mqtt.publish
            data:
              topic: "{{ repeat.item }}/rpc"
              payload: "{{ device_info_payload }}"

- id: shellies_discovery_gen2
  alias: "Shellies Discovery Gen2"
  mode: queued
  max: 999
  trigger:
    - platform: mqtt
      topic: shellies_discovery/rpc
  action:
    - service: python_script.shellies_discovery_gen2
      data:
        id: "{{ trigger.payload_json.src }}"
        device_config: "{{ trigger.payload_json.result }}"
    - service: mqtt.publish
      data:
        topic: "{{ trigger.payload_json.result.mqtt.topic_prefix }}/command"
        payload: "status_update"

Debug log:

2023-11-08 23:00:00.631 INFO (SyncWorker_4) [homeassistant.components.python_script] Executing shellies_discovery.py: {'id': 'shellyrgbw2-D92FD8', 'mac': '58BF25D92FD8', 'fw_ver': '20230913-131259/v1.14.0-gcb84623', 'model': 'SHRGBW2', 'mode': 'white', 'host': '192.168.10.104'}
2023-11-08 23:00:00.631 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] id: shellyrgbw2-D92FD8, mac: 58bf25d92fd8, fw_ver: 20230913-131259/v1.14.0-gcb84623, model: SHRGBW2
2023-11-08 23:00:00.631 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/update/shellyrgbw2-D92FD8-firmware/config', 'payload': '{"name": "Firmware", "stat_t": "~info", "val_tpl": "{{value_json[\'update\'].old_version}}", "l_ver_t": "~info", "l_ver_tpl": "{%if value_json[\'update\'].new_version%}{{value_json[\'update\'].new_version}}{%else%}{{value_json[\'update\'].old_version}}{%endif%}", "ent_pic": "https://brands.home-assistant.io/_/shelly/icon.png", "rel_u": "https://shelly-api-docs.shelly.cloud/gen1/#changelog", "tit": "Firmware", "dev_cla": "firmware", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-firmware", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_t": "~command", "pl_inst": "update_fw", "ent_cat": "diagnostic"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.631 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/update/shellyrgbw2-D92FD8-firmware/config {"name": "Firmware", "stat_t": "~info", "val_tpl": "{{value_json['update'].old_version}}", "l_ver_t": "~info", "l_ver_tpl": "{%if value_json['update'].new_version%}{{value_json['update'].new_version}}{%else%}{{value_json['update'].old_version}}{%endif%}", "ent_pic": "https://brands.home-assistant.io/_/shelly/icon.png", "rel_u": "https://shelly-api-docs.shelly.cloud/gen1/#changelog", "tit": "Firmware", "dev_cla": "firmware", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-firmware", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_t": "~command", "pl_inst": "update_fw", "ent_cat": "diagnostic"}
2023-11-08 23:00:00.634 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/button/shellyrgbw2-D92FD8-restart/config', 'payload': '{"name": "Restart", "cmd_t": "~command", "pl_prs": "reboot", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-restart", "qos": 0, "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "config", "dev_cla": "restart"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.634 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/button/shellyrgbw2-D92FD8-restart/config {"name": "Restart", "cmd_t": "~command", "pl_prs": "reboot", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-restart", "qos": 0, "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "config", "dev_cla": "restart"}
2023-11-08 23:00:00.637 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-ip/config', 'payload': '{"name": "IP address", "stat_t": "~announce", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-ip", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "val_tpl": "{{value_json.ip}}", "icon": "mdi:ip-outline", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.637 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-ip/config {"name": "IP address", "stat_t": "~announce", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-ip", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "val_tpl": "{{value_json.ip}}", "icon": "mdi:ip-outline", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}
2023-11-08 23:00:00.641 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-rssi/config', 'payload': '{"name": "WiFi signal", "stat_t": "~info", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-rssi", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "signal_strength", "stat_cla": "measurement", "unit_of_meas": "dBm", "val_tpl": "{%if value_json.wifi_sta.rssi!=0%}{{value_json.wifi_sta.rssi}}{%endif%}", "icon": "mdi:wifi", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.641 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-rssi/config {"name": "WiFi signal", "stat_t": "~info", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-rssi", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "signal_strength", "stat_cla": "measurement", "unit_of_meas": "dBm", "val_tpl": "{%if value_json.wifi_sta.rssi!=0%}{{value_json.wifi_sta.rssi}}{%endif%}", "icon": "mdi:wifi", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}
2023-11-08 23:00:00.646 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-ssid/config', 'payload': '{"name": "SSID", "stat_t": "~info", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-ssid", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "val_tpl": "{{value_json.wifi_sta.ssid}}", "icon": "mdi:wifi-settings", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.646 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-ssid/config {"name": "SSID", "stat_t": "~info", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-ssid", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "val_tpl": "{{value_json.wifi_sta.ssid}}", "icon": "mdi:wifi-settings", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}
2023-11-08 23:00:00.652 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-uptime/config', 'payload': '{"name": "Last restart", "stat_t": "~info", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-uptime", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "timestamp", "val_tpl": "{{(as_timestamp(now())-value_json.uptime)|timestamp_local}}", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.652 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-uptime/config {"name": "Last restart", "stat_t": "~info", "frc_upd": "false", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-uptime", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "timestamp", "val_tpl": "{{(as_timestamp(now())-value_json.uptime)|timestamp_local}}", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}
2023-11-08 23:00:00.656 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/device_automation/shellyrgbw2-D92FD8-input-0/button_release/config', 'payload': '{"atype": "trigger", "t": "shellies/shellyrgbw2-D92FD8/input/0", "pl": "0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "type": "button_short_release", "stype": "button_1"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.656 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/device_automation/shellyrgbw2-D92FD8-input-0/button_release/config {"atype": "trigger", "t": "shellies/shellyrgbw2-D92FD8/input/0", "pl": "0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "type": "button_short_release", "stype": "button_1"}
2023-11-08 23:00:00.659 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/device_automation/shellyrgbw2-D92FD8-input-0/button_long_press/config', 'payload': '{"atype": "trigger", "t": "shellies/shellyrgbw2-D92FD8/input_event/0", "pl": "L", "val_tpl": "{{value_json.event}}", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "type": "button_long_press", "stype": "button_1"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.659 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/device_automation/shellyrgbw2-D92FD8-input-0/button_long_press/config {"atype": "trigger", "t": "shellies/shellyrgbw2-D92FD8/input_event/0", "pl": "L", "val_tpl": "{{value_json.event}}", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "type": "button_long_press", "stype": "button_1"}
2023-11-08 23:00:00.665 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/device_automation/shellyrgbw2-D92FD8-input-0/button_short_press/config', 'payload': '{"atype": "trigger", "t": "shellies/shellyrgbw2-D92FD8/input_event/0", "pl": "S", "val_tpl": "{{value_json.event}}", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "type": "button_short_press", "stype": "button_1"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.665 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/device_automation/shellyrgbw2-D92FD8-input-0/button_short_press/config {"atype": "trigger", "t": "shellies/shellyrgbw2-D92FD8/input_event/0", "pl": "S", "val_tpl": "{{value_json.event}}", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "type": "button_short_press", "stype": "button_1"}
2023-11-08 23:00:00.669 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/event/shellyrgbw2-D92FD8-input-0/config', 'payload': '{"name": "Button 0", "stat_t": "~input_event/0", "evt_typ": ["SS", "L", "LS", "SL", "S", "SSS"], "val_tpl": "{%if value_json.event%}{{{\'event_type\':value_json.event}|to_json}}{%endif%}", "dev_cla": "button", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-input-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.669 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/event/shellyrgbw2-D92FD8-input-0/config {"name": "Button 0", "stat_t": "~input_event/0", "evt_typ": ["SS", "L", "LS", "SL", "S", "SSS"], "val_tpl": "{%if value_json.event%}{{{'event_type':value_json.event}|to_json}}{%endif%}", "dev_cla": "button", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-input-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}
2023-11-08 23:00:00.672 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/binary_sensor/shellyrgbw2-D92FD8-input-0/config', 'payload': '{"name": "Input 0", "stat_t": "~input/0", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-input-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "pl_on": "1", "pl_off": "0", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.672 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/binary_sensor/shellyrgbw2-D92FD8-input-0/config {"name": "Input 0", "stat_t": "~input/0", "en": "false", "uniq_id": "shellyrgbw2-d92fd8-input-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "pl_on": "1", "pl_off": "0", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}]}
2023-11-08 23:00:00.677 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/light/shellyrgbw2-D92FD8-0/config', 'payload': '', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.677 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/light/shellyrgbw2-D92FD8-0/config 
2023-11-08 23:00:00.679 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/binary_sensor/shellyrgbw2-D92FD8-color-overpower-0/config', 'payload': '', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.679 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/binary_sensor/shellyrgbw2-D92FD8-color-overpower-0/config 
2023-11-08 23:00:00.682 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-color-power-0/config', 'payload': '', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.682 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-color-power-0/config 
2023-11-08 23:00:00.688 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-color-energy-0/config', 'payload': '', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.688 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-color-energy-0/config 
2023-11-08 23:00:00.689 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/light/shellyrgbw2-D92FD8-white-0/config', 'payload': '{"schema": "template", "name": "Light 0", "cmd_t": "~white/0/set", "stat_t": "~white/0/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\\"turn\\":\\"on\\"{%if brightness is defined%},\\"brightness\\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\\"turn\\":\\"off\\"{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-0", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.689 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/light/shellyrgbw2-D92FD8-white-0/config {"schema": "template", "name": "Light 0", "cmd_t": "~white/0/set", "stat_t": "~white/0/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\"turn\":\"on\"{%if brightness is defined%},\"brightness\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\"transition\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\"turn\":\"off\"{%if transition is defined%},\"transition\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-0", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}
2023-11-08 23:00:00.693 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-0/config', 'payload': '{"name": "Overpower 0", "stat_t": "~white/0/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.693 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-0/config {"name": "Overpower 0", "stat_t": "~white/0/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}
2023-11-08 23:00:00.697 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-power-0/config', 'payload': '{"name": "Power 0", "stat_t": "~white/0/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.697 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-power-0/config {"name": "Power 0", "stat_t": "~white/0/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}
2023-11-08 23:00:00.701 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-0/config', 'payload': '{"name": "Energy 0", "stat_t": "~white/0/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.701 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-0/config {"name": "Energy 0", "stat_t": "~white/0/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-0", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}
2023-11-08 23:00:00.705 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/light/shellyrgbw2-D92FD8-white-1/config', 'payload': '{"schema": "template", "name": "Light 1", "cmd_t": "~white/1/set", "stat_t": "~white/1/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\\"turn\\":\\"on\\"{%if brightness is defined%},\\"brightness\\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\\"turn\\":\\"off\\"{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-1", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.705 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/light/shellyrgbw2-D92FD8-white-1/config {"schema": "template", "name": "Light 1", "cmd_t": "~white/1/set", "stat_t": "~white/1/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\"turn\":\"on\"{%if brightness is defined%},\"brightness\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\"transition\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\"turn\":\"off\"{%if transition is defined%},\"transition\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-1", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}
2023-11-08 23:00:00.707 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-1/config', 'payload': '{"name": "Overpower 1", "stat_t": "~white/1/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-1", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.707 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-1/config {"name": "Overpower 1", "stat_t": "~white/1/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-1", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}
2023-11-08 23:00:00.708 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-power-1/config', 'payload': '{"name": "Power 1", "stat_t": "~white/1/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-1", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.708 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-power-1/config {"name": "Power 1", "stat_t": "~white/1/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-1", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}
2023-11-08 23:00:00.709 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-1/config', 'payload': '{"name": "Energy 1", "stat_t": "~white/1/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-1", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.709 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-1/config {"name": "Energy 1", "stat_t": "~white/1/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-1", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}
2023-11-08 23:00:00.712 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/light/shellyrgbw2-D92FD8-white-2/config', 'payload': '{"schema": "template", "name": "Light 2", "cmd_t": "~white/2/set", "stat_t": "~white/2/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\\"turn\\":\\"on\\"{%if brightness is defined%},\\"brightness\\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\\"turn\\":\\"off\\"{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-2", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.712 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/light/shellyrgbw2-D92FD8-white-2/config {"schema": "template", "name": "Light 2", "cmd_t": "~white/2/set", "stat_t": "~white/2/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\"turn\":\"on\"{%if brightness is defined%},\"brightness\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\"transition\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\"turn\":\"off\"{%if transition is defined%},\"transition\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-2", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}
2023-11-08 23:00:00.713 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-2/config', 'payload': '{"name": "Overpower 2", "stat_t": "~white/2/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-2", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.713 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-2/config {"name": "Overpower 2", "stat_t": "~white/2/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-2", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}
2023-11-08 23:00:00.714 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-power-2/config', 'payload': '{"name": "Power 2", "stat_t": "~white/2/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-2", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.714 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-power-2/config {"name": "Power 2", "stat_t": "~white/2/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-2", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}
2023-11-08 23:00:00.715 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-2/config', 'payload': '{"name": "Energy 2", "stat_t": "~white/2/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-2", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.716 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-2/config {"name": "Energy 2", "stat_t": "~white/2/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-2", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}
2023-11-08 23:00:00.718 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/light/shellyrgbw2-D92FD8-white-3/config', 'payload': '{"schema": "template", "name": "Light 3", "cmd_t": "~white/3/set", "stat_t": "~white/3/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\\"turn\\":\\"on\\"{%if brightness is defined%},\\"brightness\\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\\"turn\\":\\"off\\"{%if transition is defined%},\\"transition\\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-3", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.718 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/light/shellyrgbw2-D92FD8-white-3/config {"schema": "template", "name": "Light 3", "cmd_t": "~white/3/set", "stat_t": "~white/3/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "cmd_on_tpl": "{\"turn\":\"on\"{%if brightness is defined%},\"brightness\":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if transition is defined%},\"transition\":{{min(transition|multiply(1000), 5000)}}{%endif%}}", "cmd_off_tpl": "{\"turn\":\"off\"{%if transition is defined%},\"transition\":{{min(transition|multiply(1000),5000)}}{%endif%}}", "stat_tpl": "{%if value_json.ison%}on{%else%}off{%endif%}", "bri_tpl": "{{value_json.brightness|float|multiply(2.55)|round}}", "uniq_id": "shellyrgbw2-d92fd8-light-white-3", "qos": "0", "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/"}
2023-11-08 23:00:00.720 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-3/config', 'payload': '{"name": "Overpower 3", "stat_t": "~white/3/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-3", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.720 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/binary_sensor/shellyrgbw2-D92FD8-white-overpower-3/config {"name": "Overpower 3", "stat_t": "~white/3/status", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "uniq_id": "shellyrgbw2-d92fd8-white-overpower-3", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "ent_cat": "diagnostic", "dev_cla": "problem", "val_tpl": "{%if value_json.overpower%}ON{%else%}OFF{%endif%}"}
2023-11-08 23:00:00.722 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-power-3/config', 'payload': '{"name": "Power 3", "stat_t": "~white/3/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-3", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.722 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-power-3/config {"name": "Power 3", "stat_t": "~white/3/power", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-power-3", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "power", "stat_cla": "measurement", "unit_of_meas": "W"}
2023-11-08 23:00:00.726 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] {'topic': 'homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-3/config', 'payload': '{"name": "Energy 3", "stat_t": "~white/3/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-3", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}', 'retain': True, 'qos': 0}
2023-11-08 23:00:00.727 DEBUG (SyncWorker_4) [homeassistant.components.python_script.shellies_discovery.py] Sending to MQTT broker: homeassistant/sensor/shellyrgbw2-D92FD8-white-energy-3/config {"name": "Energy 3", "stat_t": "~white/3/energy", "avty": [{"t": "~online", "pl_avail": "true", "pl_not_avail": "false"}, {"t": "~info", "val_tpl": "{%if value_json.mqtt.connected%}online{%else%}offline{%endif%}"}], "frc_upd": "false", "en": "true", "uniq_id": "shellyrgbw2-d92fd8-white-energy-3", "qos": 0, "dev": {"cns": [["mac", "58:bf:25:d9:2f:d8"]], "name": "Shelly RGBW2 D92FD8", "mdl": "Shelly RGBW2", "sw": "20230913-131259/v1.14.0-gcb84623", "hw": "gen1 (SHRGBW2)", "mf": "Allterco Robotics", "cu": "http://192.168.10.104/"}, "o": {"name": "Shellies Discovery", "sw": "4.5.4", "url": "https://github.com/bieniu/ha-shellies-discovery"}, "~": "shellies/shellyrgbw2-D92FD8/", "sug_dsp_prc": 1, "dev_cla": "energy", "stat_cla": "total_increasing", "unit_of_meas": "Wh", "val_tpl": "{{value|float/60}}"}

Don't know if I missed anything.. Happy to provide other info :) Thanks.

bieniu commented 10 months ago

It looks that the device is not connected to the MQTT broker. Check this icon

image

iamnikv commented 10 months ago

I checked it yesterday and it said 'Connected' even thought it was gray for some reason.. Here is the status from now:

image

bieniu commented 10 months ago

Please attach a debug log file.

iamnikv commented 10 months ago

Please attach a debug log file.

Here it the debug logs after restarting HA:

home-assistant_2023-11-09T11-25-31.807Z.log

bieniu commented 10 months ago

Is the logger configured according to the documentation? It doesn't look like it.

image

Your device doesn't respond to the Shelly.GetConfig method. Check the device configuration/connection.

iamnikv commented 10 months ago

Here is the config: image

bieniu commented 10 months ago

I mean the Shelly device.

iamnikv commented 10 months ago

Is the Shelly.GetConfig command sent over MQTT?

iamnikv commented 10 months ago

I mean the Shelly device.

image

bieniu commented 10 months ago

Is the Shelly.GetConfig command sent over MQTT?

Yes

iamnikv commented 10 months ago

Hmm, the device is connected to the Mqtt broker and I can see it there:

image

bieniu commented 10 months ago

This is your device from the configuration

image

iamnikv commented 10 months ago

yes

iamnikv commented 10 months ago

The other one is left from testing different configurations on the Shelly: image

iamnikv commented 10 months ago

Also only after I restart the Shelly will the 'events' and 'status' fields be populated in the Mqtt Explorer: image

iamnikv commented 10 months ago

Now I notices that the scripts is not enabled: image

iamnikv commented 10 months ago

Ook so I think that was the problem.. After enabling the script and restarting the Shelly (from HA), now I can see meaningful values for Firmware, Last Restart and Wifi Signal sensors: image

iamnikv commented 10 months ago

Sorry if I wasted your time @bieniu and I am grateful for guiding me to the solution! I just wonder if the script should be enabled manually (because I don't think it was mentioned in the docs) or is there something that went wrong during the script upload to the shelly..

bieniu commented 10 months ago

Due to limitations of the python_script component, Shellies Discovery must assume that its script is the first in the list. In your case this was not true, this is why the script was not enabled.

But... this is not a reason why the device doesn't respond for GetConfig. Without that your configuration will not be updated after Shellies Discovery update.

iamnikv commented 10 months ago

Do you mean that even now there might be problems? I have not actually tested if the buttons will work? Should I run some tests?

iamnikv commented 10 months ago

But... this is not a reason why the device doesn't respond for GetConfig. Without that your configuration will not be updated after Shellies Discovery update.

Maybe I should mention that I am bridging 2 Mqtt brokers.. Could that play a role in that?

bieniu commented 10 months ago

I'm not talking about the operation of the current configuration, but about future updates. changes made in new versions of Shellies Discovery will not be populated into entity configurations without valid responses to GetConfig.

The way it should work is that after manually running the Shellies Announce automation, you should see the device's response to the shellies_discovery/rpc topic in the MQTT broker. Based on the payload from this topic, Shellies Discovery automation runs the script and creates the configuration of all entities, which should also be visible in the HA log.

bieniu commented 10 months ago

Maybe I should mention that I am bridging 2 Mqtt brokers.. Could that play a role in that?

Maybe, I don't know.

iamnikv commented 10 months ago

Ok in that case, what should I do when there is a new version of Shellies Discovery?

bieniu commented 10 months ago

Make it work... there is no alternative way.

iamnikv commented 10 months ago

Got it. Thanks again ;)