Shellies Discovery Script

@Bieniu Hi, and thx for your great script.

Regarding your latest release, 1.0.0, I was wondering what’s the reason behind this point:

so breaking changes are present, the input , longpush and shortpush sensors have been removed

It’s to ease the maintenance of the script, that was not done in HA Core style?

you can use device automation triggers instead

Can you provide an example?

Event-based binary sensors long time ago have been deprecated in the HA core. The device automation triggers were introduced to the script in March 2021, so it was time to migrate :wink:

1 Like

That’s crystal clear. Thx for the explanation and the link :slight_smile:

But the input was not event based it was a state sensor that allowed to get the state of the physical switch. I have all my zigbee lights paired with shelly 2.5s where a change in the input (0/1) triggers toggeling the zigbee lights in that room. That is now not possible anymore as I can not see the state of the physical switch anymore. Or am I missing anything?

Edit: device automation triggers also show no input based actions

thanks
alex

You’re right, the state of the switch is not available now.

Do you plan on keeping it that way?

Yes, I will re-implement input sensors but as optional entities.

Great news! Much appreciated! Would be great to get long press and short press also back as I also use it (short push lights on at default 50% brightness; long press 100%). Would be sad to loose that feature

Long/short press are available by device triggers. Only input sensor will be re-implemented.

hi @Bieniu

Had to restore my home assistant from a backup, i’m now HA OS. I can see all my shelly devices in MQTT explorer, but none of my devices are work in HA. I am seeing the following errors in the logs, any idea what could be wrong ?

2022-11-11 17:08:50 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_device_automation_mqtt': ({'automation_type': 'trigger', 'topic': 'shellies/shelly1-68C63AFA0549/input_event/0', 'payload': 'L', 'value_template': '{{value_json.event}}', 'qos': 0, 'device': {'connections': [['mac', '68:c6:3a:fa:05:49']], 'name': 'Shelly 1 68C63AFA0549', 'model': 'Shelly 1', 'sw_version': '20220209-092750/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-1)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.138/'}, 'type': 'button_long_press', 'subtype': 'button_1', 'platform': 'mqtt'},)
2022-11-11 17:08:50 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_device_automation_mqtt': ({'automation_type': 'trigger', 'topic': 'shellies/shelly1-68C63AFA0549/input_event/0', 'payload': 'S', 'value_template': '{{value_json.event}}', 'qos': 0, 'device': {'connections': [['mac', '68:c6:3a:fa:05:49']], 'name': 'Shelly 1 68C63AFA0549', 'model': 'Shelly 1', 'sw_version': '20220209-092750/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-1)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.138/'}, 'type': 'button_short_press', 'subtype': 'button_1', 'platform': 'mqtt'},)
2022-11-11 17:08:51 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly 1 68C63AFA0549 Input 0', 'state_topic': 'shellies/shelly1-68C63AFA0549/input/0', 'enabled_by_default': 'false', 'unique_id': 'shelly1-68c63afa0549-input-0', 'qos': 0, 'device': {'connections': [['mac', '68:c6:3a:fa:05:49']], 'name': 'Shelly 1 68C63AFA0549', 'model': 'Shelly 1', 'sw_version': '20220209-092750/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-1)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.138/'}, 'payload_on': '1', 'payload_off': '0', 'availability_topic': 'shellies/shelly1-68C63AFA0549/online', 'payload_available': 'true', 'payload_not_available': 'false', 'platform': 'mqtt'},)

Not enough information to answer.

thanks for the quick response. Ive increased level of logging, pasting more, this tell you more ? If not, what do you need from me?

2022-11-11 18:00:30 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 SSID', 'state_topic': 'shellies/shellyrgbw2-D3D832/info', 'force_update': 'false', 'enabled_by_default': 'false', 'unique_id': 'shellyrgbw2-d3d832-ssid', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'ent_cat': 'diagnostic', 'value_template': '{{value_json.wifi_sta.ssid}}', 'icon': 'mdi:wifi-settings', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'platform': 'mqtt'},)
2022-11-11 18:00:30 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Last restart', 'state_topic': 'shellies/shellyrgbw2-D3D832/info', 'force_update': 'false', 'enabled_by_default': 'false', 'unique_id': 'shellyrgbw2-d3d832-uptime', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'ent_cat': 'diagnostic', 'device_class': 'timestamp', 'value_template': '{{(as_timestamp(now())-value_json.uptime)|timestamp_local}}', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'platform': 'mqtt'},)
2022-11-11 18:00:30 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_device_automation_mqtt': ({'automation_type': 'trigger', 'topic': 'shellies/shellyrgbw2-D3D832/input/0', 'payload': '0', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'type': 'button_short_release', 'subtype': 'button_1', 'platform': 'mqtt'},)
2022-11-11 18:00:30 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_device_automation_mqtt': ({'automation_type': 'trigger', 'topic': 'shellies/shellyrgbw2-D3D832/input_event/0', 'payload': 'L', 'value_template': '{{value_json.event}}', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'type': 'button_long_press', 'subtype': 'button_1', 'platform': 'mqtt'},)
2022-11-11 18:00:30 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_device_automation_mqtt': ({'automation_type': 'trigger', 'topic': 'shellies/shellyrgbw2-D3D832/input_event/0', 'payload': 'S', 'value_template': '{{value_json.event}}', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'type': 'button_short_press', 'subtype': 'button_1', 'platform': 'mqtt'},)
2022-11-11 18:00:30 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Input 0', 'state_topic': 'shellies/shellyrgbw2-D3D832/input/0', 'enabled_by_default': 'false', 'unique_id': 'shellyrgbw2-d3d832-input-0', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'payload_on': '1', 'payload_off': '0', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'schema': 'template', 'name': 'Shelly RGBW2 D3D832 Light 0', 'command_topic': 'shellies/shellyrgbw2-D3D832/white/0/set', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/0/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'command_on_template': '{"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%}}', 'command_off_template': '{"turn":"off"{%if transition is defined%},"transition":{{min(transition|multiply(1000),5000)}}{%endif%}}', 'state_template': '{%if value_json.ison%}on{%else%}off{%endif%}', 'brightness_template': '{{value_json.brightness|float|multiply(2.55)|round}}', 'unique_id': 'shellyrgbw2-d3d832-light-white-0', 'qos': '0', 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Overpower 0', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/0/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'unique_id': 'shellyrgbw2-d3d832-white-overpower-0', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'ent_cat': 'diagnostic', 'device_class': 'problem', 'value_template': '{%if value_json.overpower==true%}ON{%else%}OFF{%endif%}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Power 0', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/0/power', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-power-0', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'power', 'state_class': 'measurement', 'unit_of_measurement': 'W', 'value_template': '{{value|float|round(1)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Energy 0', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/0/energy', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-energy-0', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'energy', 'state_class': 'total_increasing', 'unit_of_measurement': 'Wh', 'value_template': '{{(value|float/60)|round(2)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'schema': 'template', 'name': 'Shelly RGBW2 D3D832 Light 1', 'command_topic': 'shellies/shellyrgbw2-D3D832/white/1/set', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/1/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'command_on_template': '{"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%}}', 'command_off_template': '{"turn":"off"{%if transition is defined%},"transition":{{min(transition|multiply(1000),5000)}}{%endif%}}', 'state_template': '{%if value_json.ison%}on{%else%}off{%endif%}', 'brightness_template': '{{value_json.brightness|float|multiply(2.55)|round}}', 'unique_id': 'shellyrgbw2-d3d832-light-white-1', 'qos': '0', 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Overpower 1', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/1/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'unique_id': 'shellyrgbw2-d3d832-white-overpower-1', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'ent_cat': 'diagnostic', 'device_class': 'problem', 'value_template': '{%if value_json.overpower==true%}ON{%else%}OFF{%endif%}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Power 1', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/1/power', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-power-1', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'power', 'state_class': 'measurement', 'unit_of_measurement': 'W', 'value_template': '{{value|float|round(1)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Energy 1', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/1/energy', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-energy-1', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'energy', 'state_class': 'total_increasing', 'unit_of_measurement': 'Wh', 'value_template': '{{(value|float/60)|round(2)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'schema': 'template', 'name': 'Shelly RGBW2 D3D832 Light 2', 'command_topic': 'shellies/shellyrgbw2-D3D832/white/2/set', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/2/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'command_on_template': '{"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%}}', 'command_off_template': '{"turn":"off"{%if transition is defined%},"transition":{{min(transition|multiply(1000),5000)}}{%endif%}}', 'state_template': '{%if value_json.ison%}on{%else%}off{%endif%}', 'brightness_template': '{{value_json.brightness|float|multiply(2.55)|round}}', 'unique_id': 'shellyrgbw2-d3d832-light-white-2', 'qos': '0', 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Overpower 2', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/2/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'unique_id': 'shellyrgbw2-d3d832-white-overpower-2', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'ent_cat': 'diagnostic', 'device_class': 'problem', 'value_template': '{%if value_json.overpower==true%}ON{%else%}OFF{%endif%}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Power 2', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/2/power', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-power-2', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'power', 'state_class': 'measurement', 'unit_of_measurement': 'W', 'value_template': '{{value|float|round(1)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Energy 2', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/2/energy', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-energy-2', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'energy', 'state_class': 'total_increasing', 'unit_of_measurement': 'Wh', 'value_template': '{{(value|float/60)|round(2)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'schema': 'template', 'name': 'Shelly RGBW2 D3D832 Light 3', 'command_topic': 'shellies/shellyrgbw2-D3D832/white/3/set', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/3/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'command_on_template': '{"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%}}', 'command_off_template': '{"turn":"off"{%if transition is defined%},"transition":{{min(transition|multiply(1000),5000)}}{%endif%}}', 'state_template': '{%if value_json.ison%}on{%else%}off{%endif%}', 'brightness_template': '{{value_json.brightness|float|multiply(2.55)|round}}', 'unique_id': 'shellyrgbw2-d3d832-light-white-3', 'qos': '0', 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Overpower 3', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/3/status', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'unique_id': 'shellyrgbw2-d3d832-white-overpower-3', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'ent_cat': 'diagnostic', 'device_class': 'problem', 'value_template': '{%if value_json.overpower==true%}ON{%else%}OFF{%endif%}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Power 3', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/3/power', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-power-3', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'power', 'state_class': 'measurement', 'unit_of_measurement': 'W', 'value_template': '{{value|float|round(1)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly RGBW2 D3D832 Energy 3', 'state_topic': 'shellies/shellyrgbw2-D3D832/white/3/energy', 'availability_topic': 'shellies/shellyrgbw2-D3D832/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shellyrgbw2-d3d832-white-energy-3', 'qos': 0, 'device': {'connections': [['mac', 'f4:cf:a2:d3:d8:32']], 'name': 'Shelly RGBW2 D3D832', 'model': 'Shelly RGBW2', 'sw_version': '20220209-094013/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHRGBW2)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.164/'}, 'device_class': 'energy', 'state_class': 'total_increasing', 'unit_of_measurement': 'Wh', 'value_template': '{{(value|float/60)|round(2)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:31 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_switch_mqtt': ({'name': 'Shelly 1PM A4CF12F3D9F5 Relay 0', 'command_topic': 'shellies/shelly1pm-A4CF12F3D9F5/relay/0/command', 'state_topic': 'shellies/shelly1pm-A4CF12F3D9F5/relay/0', 'payload_off': 'off', 'payload_on': 'on', 'availability_topic': 'shellies/shelly1pm-A4CF12F3D9F5/online', 'payload_available': 'true', 'payload_not_available': 'false', 'unique_id': 'shelly1pm-a4cf12f3d9f5-relay-0', 'qos': 0, 'device': {'connections': [['mac', 'a4:cf:12:f3:d9:f5']], 'name': 'Shelly 1PM A4CF12F3D9F5', 'model': 'Shelly 1PM', 'sw_version': '20220209-094317/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-PM)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.198/'}, 'platform': 'mqtt'},)
2022-11-11 18:00:32 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly 1PM A4CF12F3D9F5 Power 0', 'state_topic': 'shellies/shelly1pm-A4CF12F3D9F5/relay/0/power', 'availability_topic': 'shellies/shelly1pm-A4CF12F3D9F5/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shelly1pm-a4cf12f3d9f5-relay-power-0', 'qos': 0, 'device': {'connections': [['mac', 'a4:cf:12:f3:d9:f5']], 'name': 'Shelly 1PM A4CF12F3D9F5', 'model': 'Shelly 1PM', 'sw_version': '20220209-094317/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-PM)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.198/'}, 'device_class': 'power', 'state_class': 'measurement', 'unit_of_measurement': 'W', 'value_template': '{{value|float|round(1)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:32 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly 1PM A4CF12F3D9F5 Energy 0', 'state_topic': 'shellies/shelly1pm-A4CF12F3D9F5/relay/0/energy', 'availability_topic': 'shellies/shelly1pm-A4CF12F3D9F5/online', 'payload_available': 'true', 'payload_not_available': 'false', 'force_update': 'false', 'enabled_by_default': 'true', 'unique_id': 'shelly1pm-a4cf12f3d9f5-relay-energy-0', 'qos': 0, 'device': {'connections': [['mac', 'a4:cf:12:f3:d9:f5']], 'name': 'Shelly 1PM A4CF12F3D9F5', 'model': 'Shelly 1PM', 'sw_version': '20220209-094317/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-PM)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.198/'}, 'device_class': 'energy', 'state_class': 'total_increasing', 'unit_of_measurement': 'Wh', 'value_template': '{{(value|float/60)|round(2)}}', 'platform': 'mqtt'},)
2022-11-11 18:00:32 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly 1PM A4CF12F3D9F5 Overpower 0', 'state_topic': 'shellies/shelly1pm-A4CF12F3D9F5/relay', 'enabled_by_default': 'true', 'availability_topic': 'shellies/shelly1pm-A4CF12F3D9F5/online', 'payload_available': 'true', 'payload_not_available': 'false', 'unique_id': 'shelly1pm-a4cf12f3d9f5-overpower-0', 'qos': 0, 'device': {'connections': [['mac', 'a4:cf:12:f3:d9:f5']], 'name': 'Shelly 1PM A4CF12F3D9F5', 'model': 'Shelly 1PM', 'sw_version': '20220209-094317/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-PM)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.198/'}, 'ent_cat': 'diagnostic', 'value_template': "{%if value=='overpower'%}ON{%else%}OFF{%endif%}", 'device_class': 'problem', 'json_attributes_topic': 'overpower/0/overpower_value', 'json_attributes_template': "{{{'overpower_value':value}|tojson}}", 'platform': 'mqtt'},)
2022-11-11 18:00:32 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly 1PM A4CF12F3D9F5 WiFi signal', 'state_topic': 'shellies/shelly1pm-A4CF12F3D9F5/info', 'force_update': 'false', 'enabled_by_default': 'false', 'unique_id': 'shelly1pm-a4cf12f3d9f5-rssi', 'qos': 0, 'device': {'connections': [['mac', 'a4:cf:12:f3:d9:f5']], 'name': 'Shelly 1PM A4CF12F3D9F5', 'model': 'Shelly 1PM', 'sw_version': '20220209-094317/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-PM)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.198/'}, 'ent_cat': 'diagnostic', 'device_class': 'signal_strength', 'state_class': 'measurement', 'unit_of_measurement': 'dBm', 'value_template': '{%if value_json.wifi_sta.rssi!=0%}{{value_json.wifi_sta.rssi}}{%else%}unknown{%endif%}', 'icon': 'mdi:wifi', 'availability_topic': 'shellies/shelly1pm-A4CF12F3D9F5/online', 'payload_available': 'true', 'payload_not_available': 'false', 'platform': 'mqtt'},)
2022-11-11 18:00:32 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Shelly 1PM A4CF12F3D9F5 SSID', 'state_topic': 'shellies/shelly1pm-A4CF12F3D9F5/info', 'force_update': 'false', 'enabled_by_default': 'false', 'unique_id': 'shelly1pm-a4cf12f3d9f5-ssid', 'qos': 0, 'device': {'connections': [['mac', 'a4:cf:12:f3:d9:f5']], 'name': 'Shelly 1PM A4CF12F3D9F5', 'model': 'Shelly 1PM', 'sw_version': '20220209-094317/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-PM)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.198/'}, 'ent_cat': 'diagnostic', 'value_template': '{{value_json.wifi_sta.ssid}}', 'icon': 'mdi:wifi-settings', 'availability_topic': 'shellies/shelly1pm-A4CF12F3D9F5/online', 'payload_available': 'true', 'payload_not_available': 'false', 'platform': 'mqtt'},)

Please open an issue here Issues · bieniu/ha-shellies-discovery · GitHub and attach debug log for python_script integration.

sorry, i was grep’ing shellies and missing out on detail of errors … this looks more useful

2022-11-11 18:00:37 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discover when dispatching 'mqtt_discovery_new_binary_sensor_mqtt': ({'name': 'Shelly 1PM A4CF12F3FE63 Input 0', 'state_topic': 'shellies/shelly1pm-A4CF12F3FE63/input/0', 'enabled_by_default': 'false', 'unique_id': 'shelly1pm-a4cf12f3fe63-input-0', 'qos': 0, 'device': {'connections': [['mac', 'a4:cf:12:f3:fe:63']], 'name': 'Shelly 1PM A4CF12F3FE63', 'model': 'Shelly 1PM', 'sw_version': '20220209-094317/v1.11.8-g8c7bb8d', 'hw': 'gen1 (SHSW-PM)', 'manufacturer': 'Allterco Robotics', 'cu': 'http://192.168.1.199/'}, 'payload_on': '1', 'payload_off': '0', 'availability_topic': 'shellies/shelly1pm-A4CF12F3FE63/online', 'payload_available': 'true', 'payload_not_available': 'false', 'platform': 'mqtt'},)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 180, in async_discover
    config = schema(discovery_payload)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['device']['hw']

ok will do, not sure if youve seen my latest message i posted same time you sent this, i was grep’ping logs and leaving out details of error … if thats not enough, ill do this, how do i get python_script debug log ?

Your HA version is not compatible with Shellies Discovery version you are using.

HA upgrade sorted it out, thank you

I wanted to switch my Shelly’s to the HA shelly integration and was doing it following the steps you posted some time ago, but for some of them it didn’t work as expected. The shelly integration just won’t pick them up.
They are all Gen1 shellies., set for unicast.
Is there a way to find out why?
What should I look for?
Is it possible to troubleshoot the CoIoT?

Check the log.

Hi!

I was struggling to discover my new color bulb, I just noticed that it’s not on the supported devices.
Moreover its model (SHCB-1) does not appear in the code.
However according to the following comment implication, it used to be handled, right?

Any reason for its removal? Anything I could provide to add it (back? )? :slight_smile: