You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would make sense to avoid automatic await on update() after changing the device state, as this will create unnecessary I/O especially when changing multiple settings (e.g., turning the bulb on while adjusting its settings).
The question is, does it make sense to complicate the code by adding a device setting implicit_updates (or alike), that allows turning this behavior on if wanted?
The current API would be pretty clear without such:
All property accesses depend on update() to get the latest state. Property accesses do no I/O.
All state changes will likewise require update() to refresh the internal state. All coroutines do I/O operations.
It would make sense to avoid automatic await on
update()after changing the device state, as this will create unnecessary I/O especially when changing multiple settings (e.g., turning the bulb on while adjusting its settings).The question is, does it make sense to complicate the code by adding a device setting
implicit_updates(or alike), that allows turning this behavior on if wanted?The current API would be pretty clear without such:
update()to get the latest state. Property accesses do no I/O.update()to refresh the internal state. All coroutines do I/O operations.What do you think?