#Dynamic scenes

1 messages · Page 1 of 1 (latest)

main folio
#

Hi,

I created an automation that will blink my lights once I receive a Pagerduty from Work. It works fine, but the thing is that I use dynamic scenes to go back to the previous state of all my lights. I already listed all the lights separately because of this thread I saw on Github. But it seems I got Zigbee interference because lights will stay on and some lights won't turn on. I use the official Hue integration and I repeat certain actions already to 'solve' this zigbee issue. But still this is not working. Is there anyone who had the same problems as me and found a solution for this. Will a native Zigbee stick work better for example?

#

The automation. I triggers also another automation to create a snapshot

alias: Pagerduty Alert
description: Blink lights and restore previous state
triggers:
  - entity_id: sensor.pagerduty_total_incidents
    attribute: urgency_high
    trigger: state
conditions:
  - condition: template
    value_template: >-
      {{ trigger.from_state.attributes.urgency_high | int <
      trigger.to_state.attributes.urgency_high | int }}
  - condition: state
    entity_id: person.carsten_flokstra
    state: home
actions:
  - action: automation.trigger
    metadata: {}
    data:
      skip_condition: true
    target:
      entity_id: automation.create_snapshot_scene
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - data:
      rgb_color:
        - 0
        - 255
        - 4
    target:
      entity_id:
        - light.studio
        - light.bedroom
        - light.bathroom
        - light.color_leds_downstairs
    action: light.turn_on
  - repeat:
      count: 5
      sequence:
        - data:
            rgb_color:
              - 0
              - 255
              - 4
            flash: short
          target:
            area_id:
              - bedroom
              - bathroom
              - studio
            entity_id: light.color_leds_downstairs
          action: light.turn_on
  - action: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.all_lights
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - repeat:
      count: 2
      sequence:
        - data:
            entity_id: scene.snapshot
          action: scene.turn_on
        - delay:
            hours: 0
            minutes: 0
            seconds: 5
            milliseconds: 0
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - data: {}
    action: scene.delete
    target:
      entity_id: scene.snapshot
mode: single
#

By the way. It would be very nice if I just can create a scene with all the colors brightness levels etc for my all light group. This is a group which combines all the rooms in my house with lights.

low elbow
#

Hi

#

It's basicaly the same, but has the following:

  • include_state_on, include state_off: if it can operate hue lights that are currently on/ or off
  • try to handle a "call stack": forget it. 🙂 ... some reluctant code from testing 😉