I’m familiarising myself with Home Assistant’s Python integration, and I’m trying to reset a slider (input_number) to a default value every time the light is turned off.
The code below works for changing the value of switches, however I can’t seem to find how to change the value of an input_number. It seems that the documentation for Python isn’t very detailed.
Any pointers?
Edit: Also, is it possible to get the previous state of an entity or sensor?
Thanks!
state.set(input_boolean.mySwitch, “off”)