Hi not a super critical issue, since I can always create timers as helpers in the HA UI, but just out of curiosity, is there a way to actually create a timer directly from pyscript or is this even a bug?
The intuitive:
state.set('timer.my_demo_timer', duration="0:00:02", editable=True, restore=True, friendly_name="My Demo Timer")
kinda works and sort of creates a timer entity, but it does not actually work as a timer?
I run a test and created two timers, one with the state.set() call above and one with the HA UI:
But as you can see, the first one is not really a timer, i.e. it does not have the Start button?
the second one has:
Now the entity seems to be available as timer in pyscript and the entity even auto.expands as timer in jupyter:
But if I call for example:
timer.my_demo_timer.start(2)
the timer does not actually start?
here is the Notebook:
This seems to be a bug unless I am not doing things correctly?
And for copmpleteness, here is a file "Test timer in pyscript.ipynb" in case someone wants to replicate. The only thing to do is to create the "My Demo Timer 2" as a helper in in HA and then load the notebook and run every cell in order.
Hi not a super critical issue, since I can always create timers as helpers in the HA UI, but just out of curiosity, is there a way to actually create a timer directly from pyscript or is this even a bug? The intuitive:
state.set('timer.my_demo_timer', duration="0:00:02", editable=True, restore=True, friendly_name="My Demo Timer")
kinda works and sort of creates a timer entity, but it does not actually work as a timer?I run a test and created two timers, one with the state.set() call above and one with the HA UI:
But as you can see, the first one is not really a timer, i.e. it does not have the Start button?
the second one has:
Now the entity seems to be available as timer in pyscript and the entity even auto.expands as timer in jupyter:
But if I call for example:
timer.my_demo_timer.start(2)
the timer does not actually start?here is the Notebook:
This seems to be a bug unless I am not doing things correctly?
And for copmpleteness, here is a file "Test timer in pyscript.ipynb" in case someone wants to replicate. The only thing to do is to create the "My Demo Timer 2" as a helper in in HA and then load the notebook and run every cell in order.