Automation issue with 2 automations

So I have this automation to turn off any flood light that are turned on during the daytime - it has worked great since I set it up some weeks back:

Turn off flood lamp if turned on during daytime

  • id: OffOutSideLights-Day
    alias: ‘OffOutSideLights-Day’
    trigger:

    • platform: state
      entity_id:
      • switch.deskdoorlamp_128
        from: ‘off’
        to: ‘on’
        condition:
    • condition: numeric_state
      entity_id: sun.sun
      value_template: ‘{{ state.attributes.elevation }}’
      above: 0.0

    action:

    • delay: ‘00:00:10’
    • service: switch.turn_off
      entity_id:
      • switch.deskdoorlamp_128

So I added this NEW automation - triggered by a MQTT message:

  • id: Deck_Outside_Lights
    alias: ‘Deck-Outside-Lights’
    trigger:
    • platform: mqtt
      topic: cmnd/Deck-Outside-Lights/POWER
      payload: ‘TOGGLE’
      action:
      • service: switch.turn_on
        entity_id:
        • switch.deskdoorlamp_128

I can never turn on the switch with the 2nd automation until I disable or turn off the first one. This device is a zwave device and the command is turn it on is never sent until I disable the first automation. Any assistance would be greatly appreciated…

Blue banner top of page. Read and follow it.

OK…formated…so to repeat my issue the first script keeps the 2nd one from running…

  • id: OffOutSideLights-Day
    alias: ‘OffOutSideLights-Day’
    trigger:

    • platform: state
      entity_id:
      • switch.fpdrlite_125
      • switch.ramp_7432lite_52
      • switch.frontporchcorner_270
      • switch.flooddriveway_315
      • switch.deskdoorlamp_128
        from: ‘off’
        to: ‘on’
        condition:
    • condition: numeric_state
      entity_id: sun.sun
      value_template: ‘{{ state.attributes.elevation }}’
      above: 0.0

    action:

    • delay: ‘00:00:02’
    • service: switch.turn_off
      entity_id:
      • switch.deskdoorlamp_128

cancel
saved
« hide preview

and

  • id: Deck_Outside_Lights
    alias: ‘Deck-Outside-Lights’
    trigger:
    • platform: mqtt
      topic: cmnd/Deck-Outside-Lights/POWER
      payload: ‘TOGGLE’
      action:

      • service: switch.turn_on
        entity_id:
        • switch.deskdoorlamp_128

      indent preformatted text by 4 spaces

Try again.

1 Like