Hahaha, das wäre ja ka…dreist!
triggers:
- trigger: time_pattern
minutes: /15 # alle 15 min
conditions:
- condition: state
state: "off"
entity_id: binary_sensor.ist_jemand_zuhause
- condition: sun
after: sunset
actions:
- alias: Es dunkel, Licht an
action: homeassistant.turn_on
target:
entity_id: group.simulation
- delay:
minutes: "{{ range(10,40) |random }}"
- action: homeassistant.toggle
target:
entity_id: >
{{ state_attr('group.simulation','entity_id')
|default(['light.deko1'], true) |random }}