hthiery / python-fritzhome

Python Library to access AVM Fritz!Box homeautomation
MIT License
52 stars 37 forks source link

Add wait_device_txbusy method #103

Open mib1185 opened 3 months ago

mib1185 commented 3 months ago

With this we can wait on every set_ method afterwards for txbusy becoming 0 again, which indicates, that the command execution has been finished. This will most properly affect stationary powered devices (eq. Fritz!DECT 200 plugs or Fritz!DECT 500 bulbs), since they start the command execution immediately, while for battery powered devices (eq. Fritz!DECT 301 thermostats) the commands are queued in the Fritzbox and executed as soon as the devices wake up, therefore their txbusy is 0 right away, until they wake up. To avoid a breaking change, the wait method is disabled per default for any set_ method.

reference: https://github.com/home-assistant/core/issues/113749

coveralls commented 3 months ago

Coverage Status

coverage: 94.404% (-0.2%) from 94.652% when pulling caa54770d86fe708e2317109533030f9834143f0 on mib1185:add-wait-for-txbusy into ba3b28e1cc1e21fc7bbabacad3998fa4fb71a88b on hthiery:master.