fabicodes / zigbee2mqtt_ota_updater

Quick and possibly dirty solution to update your massive Zigbee network's devices.
GNU General Public License v3.0
12 stars 3 forks source link

Script launch error python main.py #2

Closed jojeju9428 closed 1 year ago

jojeju9428 commented 1 year ago

Hello,

I am trying to get your srcipt working on my zigbee2mqtt server or on my mqtt mosquitto broker server

I have the following error

pi@zigbee2mqtt:~/zigbee2mqtt_ota_updater $ sudo python main.py File "/home/pi/zigbee2mqtt_ota_updater/main.py", line 47 match msg.topic: ^ SyntaxError: invalid syntax

Could you help me make it work?

Thanks

fabicodes commented 1 year ago

Sorry, it's a new language feature (Structural Pattern Matching) introduced in Python 3.10 - so I'd suggest upgrading your python to at least 3.10

fabicodes commented 1 year ago

Or just update - I replaced the Pattern Matching with if statements https://github.com/fabicodes/zigbee2mqtt_ota_updater/commit/bc74860dc95d8fc107457b163bc3e2e0cc2994f6

jojeju9428 commented 1 year ago

It works with the last commit Python version 3.9.2 Thanks