Ich bin gerade auf ein Problem gestoßen.
Ich habe 2 Lampen im Zimmer. Ich habe nun eine Automation erstellt, das wenn Lampe1 eingeschalten wird das Radio an geht. In die Automation habe ich auch die Entity von Lampe2 mit eingetragen.
Wenn nun beide Lampen an sind und ich eine aus schalte, geht das Radio aus. Ich würde aber gerne dass das Radio nur aus geht wenn beide Lampen aus sind. Gibt es ein AND oder OR trigger?
Nachtrag:
alias: BAD - Badradio
description: ""
trigger:
- platform: state
entity_id:
- switch.shellyplus2pm_bad_switch_1
- switch.shellyplus2pm_bad_switch_0
to: "on"
from: "off"
id: Licht-an
- platform: state
entity_id:
- switch.shellyplus2pm_bad_switch_1
- switch.shellyplus2pm_bad_switch_0
from: "on"
to: "off"
id: Licht-aus
condition:
- condition: time
after: "06:00:00"
before: "22:00:00"
action:
- if:
- condition: trigger
id: Licht-an
then:
- service: media_player.volume_set
data:
volume_level: 0.08
target:
device_id: XXXXXX
- service: media_player.play_media
target:
entity_id: media_player.bad
data:
media_content_id: FV:2/2
media_content_type: favorite_item_id
metadata:
title: ANTENNE BAYERN 103.3 (Adult Contemporary)
thumbnail: null
media_class: genre
children_media_class: null
navigateIds:
- {}
- media_content_type: favorites
media_content_id: ""
- media_content_type: favorites_folder
media_content_id: object.item.audioItem.audioBroadcast
- if:
- condition: trigger
id: Licht-aus
then:
- service: media_player.media_stop
data: {}
target:
device_id: XXXXX
mode: single
by HarryP: Zusammenführung Doppelpost.
@f2-beamer : Bitte für Nachträge/Ergänzungen die “bearbeiten” Funktion verwenden. Danke!