1
0

Compare commits

...

16 Commits

14 changed files with 209 additions and 57 deletions

View File

@ -14,30 +14,48 @@
kelvin: 2000
brightness: 1
entity_id: light.bedroom_lights
- service: cover.set_cover_position
target:
entity_id: cover.bedroom_blinds
data:
position: 10
- 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
- repeat:
count: 10
sequence:
- service: cover.set_cover_position
target:
entity_id: cover.bedroom_blinds
data:
position: "{{ repeat.index * 10 | int }}"
- delay:
minutes: 30
seconds: 180
- service: media_player.volume_set
data:
volume_level: 0.1
entity_id: media_player.bedroom
- delay: '10'
- 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:

View File

@ -9,7 +9,7 @@
condition:
- condition: numeric_state
entity_id: sensor.bedroom_motion_illuminance
below: '21'
below: '16'
- condition: state
entity_id: input_select.home_mode
state: Day

View File

@ -10,14 +10,14 @@
- choose:
- conditions:
- condition: state
entity_id: light.table_lamp
entity_id: light.office
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.table_lamp
entity_id: light.office
- conditions:
- condition: state
entity_id: light.table_lamp
entity_id: light.office
state: 'off'
sequence:
- choose:
@ -27,7 +27,7 @@
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.table_lamp
entity_id: light.office
data:
brightness_pct: 100
kelvin: 2000
@ -37,7 +37,7 @@
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.table_lamp
entity_id: light.office
data:
brightness_pct: 100
kelvin: 3200

View File

@ -0,0 +1,32 @@
- id: f1-automation
alias: '[F1] Automation'
mode: single
trigger:
- platform: state
entity_id: calendar.2021_fia_formula_one_world_championship_race_calendar
to: 'on'
action:
- service: media_player.play_media
data:
media_content_id: https://open.spotify.com/track/5r7egnfTIQjaKSGREhIky9?si=688bbc2db49a4980
media_content_type: music
target:
entity_id: media_player.bedroom
- choose:
- conditions:
- condition: not
conditions:
- condition: state
entity_id: media_player.living_room
state: TV
attribute: source
sequence:
- service: sonos.join
data:
master: media_player.bedroom
entity_id: media_player.living_room
- service: sonos.join
data:
master: media_player.bedroom
entity_id: media_player.bathroom

View File

@ -2,16 +2,24 @@
alias: '[Hallway] Super sensor reset'
mode: restart
trigger:
- entity_id: binary_sensor.hallway_motion_sensor
- platform: state
entity_id: binary_sensor.hallway_motion_sensor
for: 00:00:05
from: 'off'
platform: state
to: 'on'
action:
- data_template:
entity_id: binary_sensor.hallway_motion_sensor
state: 'off'
service: python_script.set_state
# - service: python_script.set_state
# data_template:
# entity_id: binary_sensor.hallway_motion_sensor
# state: 'off'
- service: zha.set_zigbee_cluster_attribute
data:
ieee: 00:15:8d:00:07:75:31:c0
endpoint_id: 1
cluster_id: 1280
cluster_type: in
attribute: 2
value: '0'
- id: hallway-button
alias: '[Hallway] Button single press'

View File

@ -0,0 +1,76 @@
- id: ra-music-bathroom-arrive
alias: '[RA] Bathroom arrive'
mode: single
trigger:
- platform: state
entity_id: sensor.przemyslaws_apple_watch_room_presence
to: ra-bathroom
condition:
- condition: or
conditions:
- condition: state
entity_id: media_player.bedroom
state: playing
action:
- service: sonos.join
data:
master: media_player.bedroom
entity_id: media_player.bathroom
- id: ra-music-bathroom-leave
alias: '[RA] Bathroom leave'
mode: single
trigger:
- platform: state
entity_id: sensor.przemyslaws_apple_watch_room_presence
from: ra-bathroom
for: '0:01:00'
condition:
- condition: or
conditions:
- condition: state
entity_id: media_player.bathroom
state: playing
action:
- service: sonos.unjoin
data:
entity_id: media_player.bathroom
- id: ra-music-bedroom-arrive
alias: '[RA] Bedroom arrive'
mode: single
trigger:
- platform: state
entity_id: sensor.przemyslaws_apple_watch_room_presence
to: ra-bedroom
condition:
- condition: or
conditions:
- condition: state
entity_id: media_player.bathroom
state: playing
action:
- service: sonos.join
data:
master: media_player.bathroom
entity_id: media_player.bedroom
- id: ra-music-bedroom-leave
alias: '[RA] Bedroom leave'
mode: single
trigger:
- platform: state
entity_id: sensor.przemyslaws_apple_watch_room_presence
from: ra-bathroom
for: '0:01:00'
condition:
- condition: or
conditions:
- condition: state
entity_id: media_player.bedroom
state: playing
action:
- service: sonos.unjoin
data:
entity_id: media_player.bedroom

View File

@ -14,7 +14,7 @@
state: Day
- condition: numeric_state
entity_id: sensor.kitchen_motion_sensor_illuminance
below: '21'
below: '16'
sequence:
- choose:
- conditions:

View File

@ -13,14 +13,14 @@
- choose:
- conditions:
- condition: state
entity_id: light.table_lamp
entity_id: light.office
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.table_lamp
entity_id: light.office
- conditions:
- condition: state
entity_id: light.table_lamp
entity_id: light.office
state: 'off'
sequence:
- choose:
@ -36,7 +36,7 @@
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.table_lamp
entity_id: light.office
data:
brightness_pct: 100
kelvin: 2000
@ -46,7 +46,7 @@
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.table_lamp
entity_id: light.office
data:
brightness_pct: 100
kelvin: 3200
@ -56,7 +56,7 @@
state: Night
sequence:
- service: light.turn_on
entity_id: light.table_lamp
entity_id: light.office
data:
brightness_pct: 5
kelvin: 2700

View File

@ -2,7 +2,7 @@
alias: '[Work] Daily Warning'
trigger:
- platform: time
at: '8:30'
at: '9:30'
condition:
- condition: time
weekday:
@ -15,6 +15,9 @@
- service: light.turn_on
data:
brightness_pct: 100
entity_id: light.bathroom_color_zha_group_0x0007
- service: light.turn_on
data:
hs_color:
- 120
- 100
@ -56,7 +59,7 @@
alias: '[Work] Daily notification'
trigger:
- platform: time
at: '8:55'
at: '9:59'
condition:
- condition: time
weekday:
@ -89,7 +92,7 @@
alias: '[Work] Daily notification off'
trigger:
- platform: time
at: '9:10'
at: '10:10'
condition:
- condition: time
weekday:
@ -106,8 +109,11 @@
- id: work_finished
alias: '[Work] Notify when finished work'
trigger:
- platform: time
at: '17:00'
- platform: state
entity_id: device_tracker.amdn4684
for:
hours: 8
to: home
condition:
- condition: time
weekday:

View File

@ -14,6 +14,7 @@ http:
- 192.168.50.101
- 192.168.50.102
- 192.168.50.103
- 192.168.50.104
ip_ban_enabled: false
login_attempts_threshold: 5
image:
@ -182,6 +183,11 @@ notify:
recipient: !secret phone_number
media_player:
- platform: androidtv
name: Bedroom ATV
device_class: androidtv
host: 192.168.60.17
adbkey: "/config/android/adbkey"
- platform: androidtv
name: nVidia Shield
device_class: androidtv
@ -306,6 +312,12 @@ calendar:
- name: "Caffeine free time"
calendar: "Automations"
search: "Caffeine free"
- platform: caldav
url: https://cloud.grondek.pl/remote.php/dav
username: pgrondek
password: !secret nextcloud_token
calendars:
- "2021 FIA Formula One World Championship Race Calendar"
ble_monitor:
# Xiaomi BT Sensors
@ -319,28 +331,28 @@ ble_monitor:
report_unknown: False
discovery: True
devices:
- name: 'Bedroom sensor'
- name: 'Bedroom sensor [BLE]'
mac: '58:2D:34:3B:67:B0'
- name: 'Filament Sensor'
mac: 'A4:C1:38:EC:AE:6B'
- name: 'Computer Cave sensor'
mac: 'A4:C1:38:05:3D:AF'
- name: 'Bathroom sensor'
- name: 'Bathroom sensor [BLE]'
mac: 'A4:C1:38:49:30:DF'
- name: 'Rack sensor'
mac: 'A4:C1:38:5E:F8:84'
- name: 'Kettle'
mac: '7C:49:EB:30:61:CE'
- name: 'Thuja Pot'
- name: 'Thuja Plant'
mac: 'C4:7C:8D:6C:5B:25'
- name: 'Thuja Pot 2'
- name: 'Thuja Plant 2'
mac: 'C4:7C:8D:6C:9F:C6'
- name: 'Thuja Pot 3'
- name: 'Thuja Plant 3'
mac: 'C4:7C:8D:6C:9F:9B'
- name: 'Bedroom Plant'
mac: 'C4:7C:8D:6C:59:D5'
- name: 'Living Room Plant'
mac: 'C4:7C:8D:6C:59:D0'
- name: 'Living Room Plant 2'
mac: 'C4:7C:8D:6C:59:D5'
- name: 'Weight Scale'
mac: 'C8:47:8C:D9:6F:96'

View File

@ -25,7 +25,7 @@
name: Couch Lights
- entityId: light.desk_lightbar
name: Desk Lightbar
- entityId: light.table_lamp
- entityId: light.office
name: Table lamp
- name: Copy rest of automations
copy:

View File

@ -17,8 +17,8 @@
name: Couch Lights
- entityId: light.desk_lightbar
name: Desk Lightbar
- entityId: light.table_lamp
name: Table lamp
- entityId: light.office
name: Office lamp
- name: Concat scripts
ansible.builtin.assemble:
src: scripts

View File

@ -13,7 +13,7 @@ good_night:
- light.desk_lightbar_ambilight
- light.couch_lights
- light.tv_lights
- light.table_lamp
- light.office
- light.kitchen_lights
- light.kitchen_sink_lighstrip
- light.bathroom_lights
@ -22,7 +22,7 @@ good_night:
- light.bathroom_minor_lights
- light.bedroom_lights
- light.bed_lightstrip
- light.bed_lamp
- light.bed_lamps
- light.hallway_light
- light.hallway_lightstrip
- light.computer_computer_cave_background
@ -31,6 +31,7 @@ good_night:
entity_id:
- switch.desk_motor_on_off
- switch.printer_switch
- switch.xmas_lights_on_off
- service: cover.close_cover
entity_id:
- cover.bedroom_blinds
@ -91,7 +92,7 @@ leave_home:
- light.desk_lightbar_ambilight
- light.couch_lights
- light.tv_lights
- light.table_lamp
- light.office
- light.kitchen_lights
- light.kitchen_sink_lighstrip
- light.bathroom_lights
@ -100,7 +101,7 @@ leave_home:
- light.bathroom_minor_lights
- light.bedroom_lights
- light.bed_lightstrip
- light.bed_lamp
- light.bed_lamps
- light.hallway_light
- light.hallway_lightstrip
- light.computer_computer_cave_background

View File

@ -54,27 +54,27 @@ bedroom_all_lights_off:
- service: light.turn_off
entity_id: light.bed_lightstrip
- service: light.turn_off
entity_id: light.bed_lamp
entity_id: light.bed_lamps
bedroom_bed_lamp_toggle:
alias: '[Bedroom] Bed lamp toggle'
alias: '[Bedroom] Bed lamps toggle'
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.bed_lamp
entity_id: light.bed_lamps
state: 'on'
sequence:
- service: script.bedroom_bed_lamp_off
- conditions:
- condition: state
entity_id: light.bed_lamp
entity_id: light.bed_lamps
state: 'off'
sequence:
- service: script.bedroom_bed_lamp_on
bedroom_bed_lamp_on:
alias: '[Bedroom] Bed lamp on'
alias: '[Bedroom] Bed lamps on'
sequence:
- choose:
- conditions:
@ -83,20 +83,19 @@ bedroom_bed_lamp_on:
state: Night
sequence:
- service: light.turn_on
entity_id: light.bed_lamp
entity_id: light.bed_lamps
data:
brightness_pct: 10
kelvin: 2000
default:
- service: light.turn_on
entity_id: light.bed_lamp
entity_id: light.bed_lamps
data:
brightness_pct: 30
kelvin: 3200
bedroom_bed_lamp_off:
alias: '[Bedroom] Bed lamp off'
alias: '[Bedroom] Bed lamps off'
sequence:
- condition: state
entity_id: light.bed_lamp
state: 'off'
- service: light.turn_off
entity_id: light.bed_lamps