Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
alias: "Urlaub modus: Anwesenheits simulation"
trigger:
- platform: time_pattern
minutes: /30
condition:
- condition: state
entity_id: input_boolean.urlaubmodus
state: "on"
- condition: sun
after: sunset
after_offset: "-00:30:00"
- condition: time
before: "22:00:00"
action:
- delay: 00:{{ '{:02}'.format(range(0,30) | random | int) }}:00
- service: input_text.set_value
data_template:
entity_id: input_text.zu_schalten
value: "{{ state_attr('anwesenheit_simulation','entity_id') | random }}"
- service: homeassistant.toggle
data_template:
entity_id: "{{states('input_text.zu_schalten')}}"
initial_state: true
hide_entity: false
alias: "Holiday mode: Turning off all toggled lights"
description: ""
trigger:
- platform: time
at: "23:00:00"
condition:
- condition: state
entity_id: input_boolean.urlaubmodus
state: "on"
action:
- delay: 00:{{ range(15,59) | random | int }}:00
- service: homeassistant.turn_off
data: {}
target:
entity_id: light.anwesenheit_simulation
initial_state: true
hide_entity: false
mode: single
# Example configuration.yaml entry
sensor:
- platform: history_stats
name: "Urlaub Licht Kueche"
entity_id: light.kuechen_lights
state: "on"
type: count
start: >
{{ as_timestamp(now()) - (7*86400) }}
duration: 00:00:15