zewelor / bt-mqtt-gateway

A simple Python script which provides a Bluetooth to MQTT gateway, easily extensible via custom workers. See https://github.com/zewelor/bt-mqtt-gateway/wiki for more information.
MIT License
549 stars 116 forks source link

Added retry to switchbot worker #255

Closed ignacio-mov closed 2 years ago

ignacio-mov commented 2 years ago

Description

When the switchbot fails to connect, the worker doesn't retry the action. With this change this is solved used the base worker retry function.

Also the worker has been modified to store the current state of the switch son now you can see the correct state in the MQTT status and now if the status has changed or not

Fixes #231

Type of change

Please delete options that are not relevant.

zewelor commented 2 years ago

Thanks, please take a look at test errors.

ignacio-mov commented 2 years ago

Fixed. Thank you

zewelor commented 2 years ago

Thanks !