finally i was able to retrieve my alarm pir sensors as binary_sensors in HA
they have a polling for every 5 sec, so to turn a light on in a room, its not suitable
but however, i can use them for other cool stuff
for example
if i wakeup in the morning, i want to turn on the music and turn on a light
so i want some specific conditions on this automation
condition1 : run only between 06.00 and 07.00 am
condition2: only on weekdays
condition3 : turn on switch.music, ONLY if offcourse my mediaplayer is not playing, otherwise i would have to many turn_on services, so only if state of sensor.music is OFF
can anyone help me with those 3 conditions?
- alias: Pir sensor kitchen
initial_state: on
trigger:
platform: state
entity_id: binary_sensor.pir_sensor_1
from: 'off'
to: 'on'
- alias: Risco Living Opstaan
initial_state: on
trigger:
platform: state
entity_id: binary_sensor.risco_living
from: 'off'
to: 'on'
condition:
- condition: time
# At least one of the following is required.
after: '06:30:00'
before: '07:30:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: sensor.harmony_state_off
state: 'on'
action:
- service: light.turn_on
entity_id: light.keuken
- service: switch.turn_on
entity_id: switch.radio
well, I got it but generally it’s a bad choice of name (as ideally it should be self-explanatory by itself, which is not in your case)… just saying