1
0

Compare commits

...

7 Commits

11 changed files with 218 additions and 52 deletions

View File

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

View File

@ -1,5 +1,5 @@
- id: alarm-automation - id: alarm-clock-automation
alias: '[Alarm] Wakeup automation' alias: '[Alarm-Clock] Wakeup automation'
trigger: trigger:
- platform: state - platform: state
entity_id: calendar.automations_wakeup entity_id: calendar.automations_wakeup
@ -13,25 +13,19 @@
data: data:
kelvin: 2000 kelvin: 2000
brightness: 1 brightness: 1
entity_id: light.bedroom_lights entity_id:
- light.bedroom_lights
- light.bed_lamps
- light.bed_lightstrip
- service: light.turn_on - service: light.turn_on
data: data:
kelvin: 5300 kelvin: 5300
transition: 1800 transition: 1800
brightness: 255 brightness: 255
entity_id: light.bedroom_lights entity_id:
- service: light.turn_on - light.bedroom_lights
data: - light.bed_lamps
kelvin: 5300 - light.bed_lightstrip
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
- repeat: - repeat:
count: 10 count: 10
sequence: sequence:
@ -42,6 +36,12 @@
position: "{{ repeat.index * 10 | int }}" position: "{{ repeat.index * 10 | int }}"
- delay: - delay:
seconds: 180 seconds: 180
- choose:
- conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: disarmed
sequence:
- service: media_player.volume_set - service: media_player.volume_set
data: data:
volume_level: 0.1 volume_level: 0.1
@ -60,4 +60,10 @@
target: target:
entity_id: entity_id:
- automation.bedroom_motion_off - automation.bedroom_motion_off
- service: light.turn_off
target:
entity_id:
- light.bedroom_lights
- light.bed_lamps
- light.bed_lightstrip
mode: single 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 - platform: state
entity_id: binary_sensor.hallway_motion_sensor entity_id: binary_sensor.hallway_motion_sensor
to: 'on' to: 'on'
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
to: 'on'
- platform: state - platform: state
entity_id: binary_sensor.kitchen_motion_sensor entity_id: binary_sensor.kitchen_motion_sensor
to: 'on' to: 'on'

View File

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

View File

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

View File

@ -7,6 +7,11 @@
for: 00:00:05 for: 00:00:05
from: 'off' from: 'off'
to: 'on' to: 'on'
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
for: 00:00:05
from: 'off'
to: 'on'
action: action:
# - service: python_script.set_state # - service: python_script.set_state
# data_template: # data_template:
@ -53,6 +58,10 @@
entity_id: binary_sensor.hallway_motion_sensor entity_id: binary_sensor.hallway_motion_sensor
from: 'off' from: 'off'
to: 'on' to: 'on'
- platform: state
entity_id: binary_sensor.hallway_sensor_2_home_security_motion_detection
from: 'off'
to: 'on'
condition: condition:
- condition: numeric_state - condition: numeric_state
entity_id: sensor.office_illuminance entity_id: sensor.office_illuminance
@ -69,6 +78,11 @@
from: 'on' from: 'on'
to: 'off' to: 'off'
for: 00:00:05 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: action:
- service: script.hallway_lights_off - 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: sleep_mode:
name: "Sleep mode" name: "Sleep mode"
icon: "mdi:weather-night" icon: "mdi:weather-night"
vacation_mode:
name: "Vacation mode"
icon: "mdi:beach"
vacuum_office: vacuum_office:
name: "Vacuum Office" name: "Vacuum Office"
icon: "mdi:chair-rolling" icon: "mdi:chair-rolling"
@ -105,7 +108,7 @@ my:
person: person:
python_script: python_script:
recorder: recorder:
db_url: !secret postgres_url db_url: !secret mysql_url
scene: !include scenes.yaml scene: !include scenes.yaml
script: !include scripts.yaml script: !include scripts.yaml
ssdp: ssdp:
@ -177,28 +180,35 @@ ios:
icon: home-import-outline icon: home-import-outline
color: "#ffffff" color: "#ffffff"
zoneminder:
- host: zoneminder.grondek.pl
ssl: true
verify_ssl: true
path_zms: /zm/cgi-bin/nph-zms
path: /zm/
camera: camera:
- platform: generic - platform: zoneminder
name: '3D Printer Camera' # - platform: generic
still_image_url: https://192.168.110.11:8554/currentpic.cgi # name: '3D Printer Camera'
stream_source: rtsp://192.168.110.11:8554/unicast # still_image_url: https://192.168.110.11:8554/currentpic.cgi
rtsp_transport: udp # stream_source: rtsp://192.168.110.11:8554/unicast
verify_ssl: false # rtsp_transport: udp
scan_interval: 5 # verify_ssl: false
- platform: generic # scan_interval: 5
name: 'Kitchen Direct' # - platform: generic
still_image_url: https://root:root@192.168.110.12/cgi-bin/currentpic.cgi # name: 'Kitchen Direct'
stream_source: rtsp://192.168.110.12:8554/unicast # still_image_url: https://root:root@192.168.110.12/cgi-bin/currentpic.cgi
rtsp_transport: udp # stream_source: rtsp://192.168.110.12:8554/unicast
verify_ssl: false # rtsp_transport: udp
scan_interval: 5 # verify_ssl: false
- platform: generic # scan_interval: 5
name: 'Hallway Direct' # - platform: generic
still_image_url: https://192.168.110.13:8554/currentpic.cgi # name: 'Hallway Direct'
stream_source: rtsp://192.168.110.13:8554/unicast # still_image_url: https://192.168.110.13:8554/currentpic.cgi
rtsp_transport: udp # stream_source: rtsp://192.168.110.13:8554/unicast
verify_ssl: false # rtsp_transport: udp
scan_interval: 5 # verify_ssl: false
# scan_interval: 5
influxdb: influxdb:
host: 192.168.50.100 host: 192.168.50.100
@ -459,6 +469,10 @@ binary_sensor:
host: 192.168.50.22 host: 192.168.50.22
switch: switch:
- platform: zoneminder
command_on: Modect
command_off: Monitor
# Wake On LAN
- platform: wake_on_lan - platform: wake_on_lan
name: 'Hulk WoL' name: 'Hulk WoL'
mac: '24:4b:fe:05:e2:8b' mac: '24:4b:fe:05:e2:8b'