1
0

Compare commits

...

7 Commits

11 changed files with 218 additions and 52 deletions

View File

@ -12,6 +12,9 @@
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
- condition: state
entity_id: binary_sensor.dining_window_1_open_close
state: 'off'

View File

@ -1,5 +1,5 @@
- id: alarm-automation
alias: '[Alarm] Wakeup automation'
- id: alarm-clock-automation
alias: '[Alarm-Clock] Wakeup automation'
trigger:
- platform: state
entity_id: calendar.automations_wakeup
@ -13,25 +13,19 @@
data:
kelvin: 2000
brightness: 1
entity_id: light.bedroom_lights
entity_id:
- light.bedroom_lights
- light.bed_lamps
- light.bed_lightstrip
- service: light.turn_on
data:
kelvin: 5300
transition: 1800
brightness: 255
entity_id: light.bedroom_lights
- service: light.turn_on
data:
kelvin: 5300
transition: 1800
brightness: 255
entity_id: light.bed_lamps
- service: light.turn_on
data:
kelvin: 5300
transition: 1800
brightness: 255
entity_id: light.bed_lightstrip
entity_id:
- light.bedroom_lights
- light.bed_lamps
- light.bed_lightstrip
- repeat:
count: 10
sequence:
@ -42,22 +36,34 @@
position: "{{ repeat.index * 10 | int }}"
- delay:
seconds: 180
- service: media_player.volume_set
data:
volume_level: 0.1
entity_id: media_player.bedroom
- delay:
seconds: 10
- service: media_player.play_media
data:
entity_id: media_player.bedroom
media_content_id: 'https://open.spotify.com/playlist/3Qu9kE0ivJIkn76pxTLMFe'
media_content_type: music
- service: script.good_morning
- delay:
minutes: 30
- choose:
- conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
sequence:
- service: media_player.volume_set
data:
volume_level: 0.1
entity_id: media_player.bedroom
- delay:
seconds: 10
- service: media_player.play_media
data:
entity_id: media_player.bedroom
media_content_id: 'https://open.spotify.com/playlist/3Qu9kE0ivJIkn76pxTLMFe'
media_content_type: music
- service: script.good_morning
- delay:
minutes: 30
- service: automation.turn_on
target:
entity_id:
- automation.bedroom_motion_off
- service: light.turn_off
target:
entity_id:
- light.bedroom_lights
- light.bed_lamps
- light.bed_lightstrip
mode: single

View File

@ -0,0 +1,42 @@
- id: vacation-door-lock
alias: "[Alarm] Door relock"
trigger:
- platform: state
entity_id:
- lock.front_door_25f246fe_door_lock
to: unlocked
condition:
- condition: not
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: notify.mobile_app_iphone_pg
data:
title: "Door unlocked!"
message: Front door was unlocked, trying to lock it back
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.front_door_open_close
state: 'on'
sequence:
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.front_door_open_close
to: 'off'
- repeat:
until:
- condition: state
entity_id: lock.front_door_25f246fe_door_lock
state: locked
sequence:
- service: lock.lock
target:
entity_id: lock.front_door_25f246fe_door_lock
- service: notify.mobile_app_iphone_pg
data:
title: "Door locked back"
message: Front door was successfully locked
mode: single

View File

@ -0,0 +1,24 @@
- id: alarm-notify-guest
alias: '[Alarm] Notify about guest'
description: ''
mode: single
trigger:
- platform: state
entity_id:
- person.andrzej_legowski
- person.piotr_madej
- person.matka
- person.mariusz_ablewicz
to: home
condition:
- condition: not
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
action:
- service: notify.mobile_app_iphone_pg
data:
title: "Someone is near home"
message: >
{{ state_attr(trigger.entity_id, 'friendly_name') }} has connected to guest wifi

View File

@ -0,0 +1,23 @@
- id: alarm-disarm-andrzej
alias: "[Alarm][Vacation] Disarm Andrzej arrive"
mode: single
trigger:
- platform: state
entity_id:
- person.andrzej_legowski
to: home
condition: [ ]
action:
- service: script.arrive_home
- id: alarm-disarm-andrzej
alias: "[Alarm][Vacation] Disarm Andrzej arrive"
mode: single
trigger:
- platform: state
entity_id:
- person.andrzej_legowski
to: not_home
action:
- service: script.leave_home

View File

@ -11,6 +11,9 @@
- platform: state
entity_id: binary_sensor.hallway_motion_sensor
to: 'on'
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
to: 'on'
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
to: 'on'

View File

@ -30,6 +30,10 @@
entity_id: binary_sensor.hallway_motion_sensor
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
from: 'off'
to: 'on'
action:
- service: notify.mobile_app_iphone_pg
data:

View File

@ -5,6 +5,10 @@
- platform: state
entity_id: calendar.2021_fia_formula_one_world_championship_race_calendar
to: 'on'
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: media_player.play_media
data:

View File

@ -7,6 +7,11 @@
for: 00:00:05
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
for: 00:00:05
from: 'off'
to: 'on'
action:
# - service: python_script.set_state
# data_template:
@ -53,6 +58,10 @@
entity_id: binary_sensor.hallway_motion_sensor
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
from: 'off'
to: 'on'
condition:
- condition: numeric_state
entity_id: sensor.office_illuminance
@ -69,6 +78,11 @@
from: 'on'
to: 'off'
for: 00:00:05
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
from: 'on'
to: 'off'
for: 00:00:05
action:
- service: script.hallway_lights_off

View File

@ -0,0 +1,29 @@
- id: vacation-enable
alias: '[Vacation] mode enabled'
trigger:
- platform: state
entity_id:
- input_boolean.vacation_mode
to: 'on'
action:
- service: presence_simulation.start
data:
entity_id:
- light.bedroom_lights
- light.bed_lamps
- light.office
- light.kitchen_lights
- light.hallway_light
delta: 5
restore_states: True
random: 300
- id: vacation-disable
alias: '[Vacation] mode disabled'
trigger:
- platform: state
entity_id:
- input_boolean.vacation_mode
to: 'off'
action:
- service: presence_simulation.stop

View File

@ -37,6 +37,9 @@ input_boolean:
sleep_mode:
name: "Sleep mode"
icon: "mdi:weather-night"
vacation_mode:
name: "Vacation mode"
icon: "mdi:beach"
vacuum_office:
name: "Vacuum Office"
icon: "mdi:chair-rolling"
@ -105,7 +108,7 @@ my:
person:
python_script:
recorder:
db_url: !secret postgres_url
db_url: !secret mysql_url
scene: !include scenes.yaml
script: !include scripts.yaml
ssdp:
@ -177,28 +180,35 @@ ios:
icon: home-import-outline
color: "#ffffff"
zoneminder:
- host: zoneminder.grondek.pl
ssl: true
verify_ssl: true
path_zms: /zm/cgi-bin/nph-zms
path: /zm/
camera:
- platform: generic
name: '3D Printer Camera'
still_image_url: https://192.168.110.11:8554/currentpic.cgi
stream_source: rtsp://192.168.110.11:8554/unicast
rtsp_transport: udp
verify_ssl: false
scan_interval: 5
- platform: generic
name: 'Kitchen Direct'
still_image_url: https://root:root@192.168.110.12/cgi-bin/currentpic.cgi
stream_source: rtsp://192.168.110.12:8554/unicast
rtsp_transport: udp
verify_ssl: false
scan_interval: 5
- platform: generic
name: 'Hallway Direct'
still_image_url: https://192.168.110.13:8554/currentpic.cgi
stream_source: rtsp://192.168.110.13:8554/unicast
rtsp_transport: udp
verify_ssl: false
scan_interval: 5
- platform: zoneminder
# - platform: generic
# name: '3D Printer Camera'
# still_image_url: https://192.168.110.11:8554/currentpic.cgi
# stream_source: rtsp://192.168.110.11:8554/unicast
# rtsp_transport: udp
# verify_ssl: false
# scan_interval: 5
# - platform: generic
# name: 'Kitchen Direct'
# still_image_url: https://root:root@192.168.110.12/cgi-bin/currentpic.cgi
# stream_source: rtsp://192.168.110.12:8554/unicast
# rtsp_transport: udp
# verify_ssl: false
# scan_interval: 5
# - platform: generic
# name: 'Hallway Direct'
# still_image_url: https://192.168.110.13:8554/currentpic.cgi
# stream_source: rtsp://192.168.110.13:8554/unicast
# rtsp_transport: udp
# verify_ssl: false
# scan_interval: 5
influxdb:
host: 192.168.50.100
@ -459,6 +469,10 @@ binary_sensor:
host: 192.168.50.22
switch:
- platform: zoneminder
command_on: Modect
command_off: Monitor
# Wake On LAN
- platform: wake_on_lan
name: 'Hulk WoL'
mac: '24:4b:fe:05:e2:8b'