Time based automation not going

What we know:

  • The clock is correct.
  • It works if you manually call service.turn_on for switch.washer.
  • It does not work if you manually trigger the automation.

:thinking:

Is there anything reported in the log? Normally, every time an automation executes, there’s a line or two posted in the log file. Any errors?

try:

  action:
    service: switch.turn_on
    entity_id: switch.washer

instead of:

  action:
    service: switch.turn_on
    data:
      entity_id: switch.washer

never use the data field if no extra data is required. Even if it might not solve your issue, it isn’t redundant.

It doesn’t matter. I just tried it with and without data: and the automation worked correctly.

I’m almost positive the Automation Editor always includes “data:” even if there’s only item.

FWIW, I use Visual Studio Code and only use data: if there’s more than one item.

never work with the editor, it makes for such unreadable automations… As said, it might not solve the issue, but it is redundant so take it out. 1 less line to cause issues.

even so, with multiple entity_id’s to switch, without extra data, there is no need for the data field, only a listing of entity_ids.

getting back to this action, it should be fired when clicking trigger, since there is no condition to be evaluated, and the trigger button does in fact do as the dev-service does with that switch.

use entity_id!! not entity.id…

Bingo! Foiled by my typo!

Obviously that’s not the same automation I was using on my system. How did it pass Config Check on the user’s system?

That type was bound to cause some sort of error in the log.

… and proving yet again that data: was not the issue. :wink:

The data was placed in there from the GUI setup

I didn’t even see entity.id instead of entity_id. Doh!

No worries. You were trying to help!

1 Like