Help needed with timer automation

I have several Sonoffs running Tasmota which I would like to have run as timers. I’ve used Configuration>Automations in Hassio to create the timer, but it does not switch the Sonoffs, though it shows at the automation triggered in the Logbook. I’m able to switch the device via overview, so I know the switch is configured correctly, so it must be an issue with the automation. Any help please:

- id: '1574671407111'
  alias: Marine Tank Lights - Off
  description: ''
  trigger:
  - at: '18:20:00'
    platform: time
  condition: []
  action:
  - condition: state
    entity_id: switch.marine_tank
    state: 'off'

So what brings the switch on.?
And what starts the timer ?
All you have here is something that will be triggered at 18:20 and go straight to action where it will do nothing but only IF your marine tank is off.
Otherwise it will do nothing.
What are you going for instead ?

I have this to bring the tank on, but I guess this won’t work either. I’m very new to this, so excuse me if I’m being a little dumb:

- id: '1574671347378'
  alias: Marine Tanks Light - On
  description: ''
  trigger:
  - at: '13:00:00'
    platform: time
  condition: []
  action:
  - condition: state
    entity_id: switch.marine_tank
    state: 'on'

No, we all start somewhere and we all have to learn.
You do what research you can and ask questions, no problem

So you want the tank on at 13:00
And off again at 18:20 ???

Software has to state clearly in a specific language and syntax what it wants to happen
So do you when specifying it.
Else we will all just be guessing

1 Like

Yes, I want it to turn on at 13:00 and off at 18:20. I thought I understood the syntax, as I have a similar one run for my climate control, but clearly I don’t. Any help please?

- id: '1574671347378'
  alias: Marine Tanks Light - On
  description: ''
  trigger:
  - at: '13:00:00'
    platform: time
  action: 
  - service: switch.turn_off 
    entity_id: switch.marine_tank

Though I’m doing this from my phone so the spacing maybe off (if so I’ll come back and adjust it)

2 Likes

That worked great and now that I have reviewed what I had and what you have, I can see where my mistake was made. Thank you very much.

See, you’ve learned something, now you can build on it.
Good luck with your automations

1 Like