Update:
I found that changing the script line 19 to CONF_ID = "id" instead of CONF_ID = "id" solves this issue, but I’m not sure why my device return id and not dev_id
I add ur script in the python script folder then i restart twice but i cant see just 2 entities the announce and discovery entities i can see my shellys .
Can u help me with the custom script config. How i can add my shellys , see my shellys topics in the link i sent before
1597657881: Warning: Mosquitto should not be run as root/administrator.
1597657882: New connection from 192.168.1.100 on port 1883.
[INFO] found mqtt_admin on local database
1597657883: New client connected from 192.168.1.100 as shellyswitch25-693FA7 (p2, c1, k60, u'mqtt_admin').
1597657883: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1597657883: New client connected from 172.30.32.1 as auto-FE235D0D-7E2F-EFBE-FC90-2E473C17D963 (p2, c1, k60, u'homeassistant').
1597657888: New connection from 192.168.1.100 on port 1883.
1597657888: New client connected from 192.168.1.100 as DVES_C69844 (p2, c1, k15, u'mqtt_admin').
1597657939: New connection from 192.168.1.100 on port 1883.
1597657939: Socket error on client <unknown>, disconnecting.
1597657998: New connection from 192.168.1.100 on port 1883.
1597657998: Socket error on client <unknown>, disconnecting.
1597658063: New connection from 192.168.1.100 on port 1883.
1597658063: Socket error on client <unknown>, disconnecting.
1597658117: New connection from 192.168.1.100 on port 1883.
1597658117: Socket error on client <unknown>, disconnecting.
1597658181: New connection from 192.168.1.100 on port 1883.
1597658181: Socket error on client <unknown>, disconnecting.
2020-08-17 13:00:00 INFO (SyncWorker_2) [homeassistant.components.python_script] Executing shellies_discovery.py: {'id': 'shellyswitch25-693FA7', 'mac': '2EF432693FA7', 'fw_ver': '20190329-124426/master@854171ac', 'discovery_prefix': 'hass', 'qos': 2, 'shellyswitch25-68EF11': {'mode': 'roller', 'roller-0-name': 'Room Door', 'roller-0-class': 'door'}, 'shellyswitch25-693FA7': {'mode': 'roller', 'roller-0-name': 'Room Window', 'roller-0-class': 'window'}}
2020-08-17 13:00:00 ERROR (SyncWorker_2) [homeassistant.components.python_script.shellies_discovery.py] Error executing script: list index out of range
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 205, in execute
exec(compiled.code, restricted_globals)
File "shellies_discovery.py", line 353, in <module>
File "/usr/local/lib/python3.8/site-packages/RestrictedPython/Eval.py", line 35, in default_guarded_getitem
return ob[index]
IndexError: list index out of range