Mutually Dependent Automations

Hello there!

I got the below automations that work independently. However, when I turn on one of them, the other is supposed to turn_off and vice-versa. I tried including a service to turn off the other among the one`s actions, but the whole thing keeps shifting pretty quickly.

Apresentar

  • alias: ‘Apresentar’
    hide_entity: False
    initial_state: ‘off’
    trigger:
    platform: state
    entity_id: automation.apresentar
    action:
    • service: switch.turn_off
      entity_id: switch.palco
    • service: switch.turn_on
      entity_id: switch.fundo
    • service: switch.turn_off
      entity_id: switch.centro

Conversar

  • alias: ‘Conversar’
    hide_entity: False
    initial_state: ‘off’
    trigger:
    platform: state
    entity_id: automation.conversar
    action:
    • service: switch.turn_on
      entity_id: switch.palco
    • service: switch.turn_on
      entity_id: switch.fundo
    • service: switch.turn_on
      entity_id: switch.centro

Thanks a lot for your help!

Can you post again your code using code blocks as said on the page top?

1 Like

E aí!? Blz? Não sei bem como pôr em block codes, então vai o print mesmo! Poderia tb dizer se usa o home assistant para vender soluções de automação, ou somente para uso pessoal?