Dimming to off over 5 mins from Automation (2021)

Hey guys,

I’ve been looking around and reading the doco, I think I mostly have this now.

I have transitions working, but I cant actually get them to fire correctly

What am I doing wrong here?

Thanks!

action:
  - service: script.turn_on
    data: {}
    entity_id: script.gotosleep
  - type: turn_on
    device_id: 
    entity_id: light.bedroom_led_strip
    domain: light
    brightness_pct: 30
  - type: turn_on
    device_id: 
    entity_id: light.right_bedside_lamp
    domain: light
    brightness_pct: 25
  - type: turn_on
    device_id: 
    entity_id: light.left_bedside_lamp
    domain: light
    brightness_pct: 25
  - service: light.turn_on
    data:
      transition: 300
      brightness: 0
    entity_id: light.left_bedside_lamp
  - service: light.turn_on
    data:
      transition: 300
      brightness: 0
    entity_id: light.right_bedside_lamp
  - service: light.turn_on
    data:
      transition: 300
      brightness: 0
    entity_id: light.bedroom_led_strip
mode: single
max: 10

You don’t have any trigger in your automation.
Also better usr the light.turn_off services to turn off the lights.

action:
  - service: script.turn_on
    entity_id: script.gotosleep
  - service: light.turn_on
    entity_id: light.bedroom_led_strip
    data:
      brightness_pct: 30
  - service: light.turn_on
    entity_id:
      - light.right_bedside_lamp
      - light.left_bedside_lamp
    data:
      brightness_pct: 25
  - service: light.turn_off
    data:
      transition: 300
    entity_id: 
      - light.left_bedside_lamp
      - light.right_bedside_lamp
      - light.bedroom_led_strip
mode: single
max: 10

Thats awesome! thanks, I have to remember that I can put them all together like that LOL

I do have a trigger, I just took it out for this :slight_smile:

Ok so, still not working. BUT, I think its my ESPhome, I just migrated and they just drop off every 30 seconds.

Hope I don’t have to go back to Tasmota, I tested it and they don’t support the transitions.

Anyway, ill get back to you soon, and thanks so much for this :slight_smile:

OK!

Just trying to put out all these fires so I can go to bed HAHA

ESPhome seems ok, gave them all static IPs, seems to have helped.

So, what you gave me isn’t working, but putting a delay of 1 second between the on and off, sorted it out.

So really thanks for that. I was stumped before!

action:
  - service: light.turn_on
    entity_id: light.bedroom_led_strip
    data:
      brightness_pct: 40
  - service: light.turn_on
    entity_id:
      - light.right_bedside_lamp
      - light.left_bedside_lamp
    data:
      brightness_pct: 30
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: light.turn_off
    data:
      transition: 300
    entity_id:
      - light.left_bedside_lamp
      - light.right_bedside_lamp
      - light.bedroom_led_strip
mode: single
1 Like