How to switch based upon schedule

I have created a schedule where on a daily base at 3 specific times something should be switched on and 1h30 later it should be switched off (a Shelly Power Plug)

Next I have created an automation to switch the power plug based upon the state of the schedule. But it doesn’t seem to work. What am I doing wrong?

alias: Boiler STATE based upon schedule
description: ""
trigger:
  - platform: state
    entity_id:
      - schedule.boiler
    to: "on"
    id: Boiler ON
    from: "off"
  - platform: state
    entity_id:
      - schedule.boiler
    to: "off"
    id: Boiler OFF
    from: "on"
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: Boiler ON
        sequence:
          - type: turn_on
            device_id: xxxxxxxxxxxxxxxxxxxx
            entity_id: switch.pp_boiler
            domain: switch
      - conditions:
          - condition: trigger
            id: Boiler OFF
        sequence:
          - type: turn_off
            device_id: xxxxxxxxxxxxxxxxxxxx
            entity_id: switch.pp_boiler
            domain: switch
mode: single

That looks ok to me. What does the trace tell you?

Maybe replace the spaces in your trigger ids with underscores and use lower-case letters.

I will check the next 24H what the automation trace look like. Last 24H i have checked the history of the entity and it didn’t switch as suposed (state was only ‘on’ where it should have been off

I have removed spaced, replaced them with underscores and I used only lower-case letters… and it seems to work.
Glad my automation was correct and thanks for your thoughts

1 Like

Here I am again :upside_down_face:

I was wondering if I could add something to the automation (could find it on google ‘how to’)
Let’s say the light turns on with brightness_pct: 10 can I have it increased with pct steps to a fix value pct (let’s say max 80%) and within a time frame?

Again in node red this is easy to implement, but need to learn how to with automations :slight_smile:

Thanks again