Hello. I want to have a button which cycles a light between a few different colours. I have created an input_number to store an index to the current colour. I have a script which can increment this, but I do not know how to reset the number once it reaches the max.
I have got:
sequence:
- alias: "Inc"
service: input_number.increment
data:
entity_id: input_number.bedroomlightsettings
- alias: "Reset"
service: input_number.set_value
data:
entity_id: input_number.bedroomlightsettings
value: 0
condition:
condition: numeric_state
entity_id: input_number.bedroomlightsettings
above: 3
This gives me the error:
Message malformed: Unable to determine action @ data[‘sequence’][0]
I don’t really understand these scripts, particularly when to indent and when to use a hyphen.
Any help is appreciated. Thanks.