I do most stuff in NR, but I have some scripts for Alexa scenes. Im trying to make this one a little more complicated and add a condition so it wont turn off the printer if its printing.
But the condition doesnt work (which is surprising that this new fancy gui can create scripts that dont work
Can anyone show me what Ive done wrong?
Thanks
alias: 'Printer: Turn Off Printer'
sequence:
- condition: not
conditions:
- condition: state
entity_id: sensor.octoprint_current_state
state: printing
- service: rest_command.shutdown_octoprint
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
entity_id: switch.printer
mode: single
I mean, the GUI doesnât know what you want, so itâs ultimately your fault if something doesnât work as expected. You also didnât explain what youâre hoping that script will do and what it is doing instead, so it is hard to help you.
Have you confirmed in the states tab of the developer tools that `printingâ is the state that sensor shows?
Yes, of course. If âprintingâ is not a state value. What I meant about the GUI was, that you shouldnât be able to go wrong with script syntax. Which is where I must have made a mistake I thought.
BUT!
I remembered the new script debug mode (I stopped using scripts about a year ago for the most part)
After checking that, for some reason printing needs capitalization. I donât think Iâve ever seen capitalization on a state value before