Inital Commit

This commit is contained in:
2022-10-11 15:40:40 +13:00
commit 7089991005
50 changed files with 1313 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
- id: do_random_actions_when_away
alias: Activate Random Actions for Security
mode: parallel # Enable parallel executions
trigger:
- platform: time_pattern
minutes: /5
condition:
alias: "Away routine active, nearly sunset, and all family not home"
condition: and
conditions:
- condition: sun
after: sunset
after_offset: -00:30:00 #30 mins before
- condition: state
entity_id: input_boolean.away_occupied_routine
state: "on"
- condition: state
entity_id: group.family_away
state: "not_home"
action:
service: script.light_duration
data:
# Pass randomly selected light from "group.simulation_lights" as script variable "light"
light: "{{states.group.simulation_lights.attributes.entity_id | random}}"
# random value between 5 & 29
duration: "00:{{ '{:02}'.format(range(5,29) | random | int) }}:00"