Device trigger in multiple automations

Hello,

I’m now using Home Assistant for several months and it’s working nice and it was easy to learn so everything I needed I get over google but now I have a strange thing that doesn’t work like I wan to.

I have an automation that turns off the radio if the TV is turned on.

- alias: Radio aus bei TV
  initial_state: true
  trigger:
    platform: state
    entity_id: switch.wohnzimmer_tv
    to: 'on'
  action:
  - delay: '00:00:25'
  - service: switch.turn_off
    entity_id: switch.esszimmer_audio
  - service: media_player.turn_off
    entity_id: media_player.cast_esszimmer

This automation is working nice.
I bought an new Smart-TV (Samsung) that I want to turn on seperate with the same trigger (state of switch.wohnzimmer_tv) but this automation doesn’t get triggered:

- alias: smarttv_power
  initial_state: true
  trigger:
    platform: state
    entity_id: switch.wohnzimmer_tv
    to: 'on'
  action:
  - service: switch.turn_on
    entity_id: switch.stvwohn

this won’t be triggered but the first automation with the same trigger will be executed.

Is it not possible to run multiple automations with one device as trigger?
My Home Assistant is running on an Raspi 3.

Why not just put all the actions in the one automation?

- alias: Radio aus bei TV
  initial_state: true
  trigger:
    platform: state
    entity_id: switch.wohnzimmer_tv
    to: 'on'
  action:
  - service: switch.turn_on
    entity_id: switch.stvwohn
  - delay: '00:00:25'
  - service: switch.turn_off
    entity_id: switch.esszimmer_audio
  - service: media_player.turn_off
    entity_id: media_player.cast_esszimmer

Because that is not that what I want to do.

My main question is, if it can be the cause that my automation won’t be executed because I’m running two automations to the same time from one trigger.

I don’t know if you can have two automations with the same trigger and I’m not in a position to test it for a few days.
Could you explain why you must have two automations when one would have exactly the same outcome?

The explainitaion is that the samsung tv switch (switch.stvwohn) depends on switch.wohnzimmer_tv and vice versa.

switch.stvwohn is defined as the follow and it’s working:

 - platform: wake_on_lan
   mac_address: "9C:8C:6E:52:F3:E6"
   name: stvwohn
   host: 10.9.40.20
   turn_off:
     service: shell_command.tv_power

The mediaplayer_samsungtv is not working with the model of my samsung so I worked around that with this switch.

switch.wohnzimmer_tv is an wifi swich that turns on an soundbar, blu-ray player and other things that are releated to the tv.

So if the switch.wohnzimmer_tv turned on - the samsung tv needs also to be turned on because it’s one unit and the switch.wohnzimmer_tv is used as action in other automations.

I hope that it’s understandable.

Okay I resolve it with an small workaround but it would be nice to know if it is in general that an trigger can only be used once?

I created an group.tv_wohnzimmer with both switches as entity and replaced it on all automation, scripts and scenes.

As far as I know a trigger can be used as many times as you want.

Are you sure it’s that the automation isn’t triggering or is it that the action that you are telling it to perform when it triggers is incorrect?

try changing the service in the second automation to ‘homeassistant.turn_on’ and see if that gets the switch to operate.