Closed narfotic closed 10 months ago
It's possible using the validation parameter.
service: retry.call
data:
service: light.turn_on
validation: "[[ is_state('light.group1', 'on') ]]"
target:
entity_id: light.light1
BTW, you don't need to use YAML for that. retry.actions
(which is UI friendly) also supports the validation parameter.
Checklist
Is your feature request related to a problem? Please describe.
I use Adaptive Lighting to adjust my lights to the time of day. Sometimes this plugin switches some lights back on after they have switched of. To be able to distinguish between some lights being switched on by motion or all lights by a switch, I need my light groups to only be 'On' when all members are 'On'. For Retry to work in this case, I would create a separate group which will be 'On' when any members are 'On' and have Retry check for this group.
Describe the solution you'd like
I would like to be able to define a different entity to check if an automation has worked. Don't know if this is possible in the way Retry is currently implemented.
Describe alternatives you've considered
I just live with some lights switching on randomly.
Additional context
No extra context.