1
0
Fork 0

Compare commits

...

6 commits

12 changed files with 223 additions and 163 deletions

View file

@ -126,7 +126,7 @@
- binary_sensor.octoprint_printing
condition:
- condition: numeric_state
entity_id: sensor.octoprint_target_bed_temp
entity_id: sensor.octoprint_bed_target
below: '100'
action:
- service: switch.turn_on
@ -142,7 +142,7 @@
- binary_sensor.octoprint_printing
condition:
- condition: numeric_state
entity_id: sensor.octoprint_target_bed_temp
entity_id: sensor.octoprint_bed_target
above: '99'
action:
- service: switch.turn_off
@ -158,7 +158,7 @@
to: "0"
condition:
- condition: numeric_state
entity_id: sensor.octoprint_target_bed_temp
entity_id: sensor.octoprint_bed_target
above: 0
action:
- service: notify.mobile_app_iphone

View file

@ -1,22 +1,3 @@
- id: hallway-motion-reset
alias: '[Hallway] Super sensor reset'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.hallway_motion_sensor
for: 00:00:05
from: 'off'
to: 'on'
action:
- 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'
mode: single
@ -46,13 +27,14 @@
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.hallway_motion_sensor
from: 'off'
to: 'on'
entity_id:
- binary_sensor.hallway_motion_sensor
- binary_sensor.hallway_person_occupancy
to: "on"
condition:
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '170'
below: '200'
action:
- service: script.hallway_lights_on
@ -61,10 +43,19 @@
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.hallway_motion_sensor
entity_id:
- binary_sensor.hallway_motion_sensor
- binary_sensor.hallway_person_occupancy
from: 'on'
to: 'off'
for: 00:00:05
for: 00:00:01
condition:
- condition: state
entity_id: binary_sensor.hallway_motion_sensor
state: "off"
- condition: state
entity_id: binary_sensor.hallway_person_occupancy
state: "off"
action:
- service: script.hallway_lights_off

View file

@ -2,19 +2,22 @@
alias: '[Kitchen] Lights On'
mode: single
trigger:
# - platform: state
# entity_id: binary_sensor.kitchen_motion_sensor
# from: 'off'
# to: 'on'
# - platform: state
# entity_id: binary_sensor.kitchen_tabletop_motion_detection
# to: 'on'
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.kitchen_tabletop_motion_detection
entity_id: binary_sensor.presence_sensor_fp2_kitchen
to: 'on'
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '170'
below: '200'
sequence:
- service: script.kitchen_lights_on
@ -23,30 +26,33 @@
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
for: '0:02:00'
from: 'on'
entity_id: binary_sensor.presence_sensor_fp2_kitchen
to: 'off'
- platform: state
entity_id: binary_sensor.kitchen_sink_motion_sensor
to: 'off'
for: '0:02:00'
- platform: state
entity_id: binary_sensor.kitchen_tabletop_motion_detection
to: 'off'
for: '0:02:00'
condition:
- condition: state
entity_id: binary_sensor.kitchen_motion_sensor
state: 'off'
for: '0:02:00'
- condition: state
entity_id: binary_sensor.kitchen_sink_motion_sensor
state: 'off'
for: '0:02:00'
- condition: state
entity_id: binary_sensor.kitchen_tabletop_motion_detection
state: 'off'
for: '0:02:00'
# - platform: state
# entity_id: binary_sensor.kitchen_motion_sensor
# for: '0:02:00'
# from: 'on'
# to: 'off'
# - platform: state
# entity_id: binary_sensor.kitchen_sink_motion_sensor
# to: 'off'
# for: '0:02:00'
# - platform: state
# entity_id: binary_sensor.kitchen_tabletop_motion_detection
# to: 'off'
# for: '0:02:00'
# condition:
# - condition: state
# entity_id: binary_sensor.kitchen_motion_sensor
# state: 'off'
# for: '0:02:00'
# - condition: state
# entity_id: binary_sensor.kitchen_sink_motion_sensor
# state: 'off'
# for: '0:02:00'
# - condition: state
# entity_id: binary_sensor.kitchen_tabletop_motion_detection
# state: 'off'
# for: '0:02:00'
action:
- service: script.kitchen_lights_off

View file

@ -23,56 +23,7 @@
type: remote_button_alt_short_press
subtype: button_2
action:
- choose:
- conditions:
- condition: state
entity_id: light.couch_lights
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.couch_lights
- conditions:
- condition: state
entity_id: light.couch_lights
state: 'off'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.couch_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.couch_lights
data:
brightness_pct: 100
kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.couch_lights
data:
brightness_pct: 5
kelvin: 2700
- service: script.living_room_lights_toggle
- id: living-room-button-3 # Middle left
alias: '[Living Room] Button 3 - AndroidTV'

View file

@ -0,0 +1,25 @@
- id: living-room-lights-on
alias: '[Living Room] Lights On'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_couch
to: 'on'
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '200'
sequence:
- service: script.living_room_lights_on
- id: living-room-lights-off
alias: '[Living Room] Lights Off'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_couch
to: 'off'
action:
- service: script.living_room_lights_off

View file

@ -26,7 +26,7 @@
trigger:
- platform: numeric_state
entity_id: sensor.office_illuminance
below: '170'
below: '200'
for:
hours: 0
minutes: 5
@ -43,6 +43,9 @@
- condition: state
entity_id: device_tracker.amdn4684
state: 'home'
- condition: state
entity_id: binary_sensor.presence_sensor_fp2_office
state: 'on'
- condition: state
entity_id: input_select.home_mode
state: Day
@ -74,7 +77,7 @@
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '30'
below: '800'
below: '2000'
for:
hours: 0
minutes: 0
@ -82,7 +85,7 @@
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '30'
below: '800'
below: '2000'
for:
hours: 0
minutes: 1
@ -90,7 +93,7 @@
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '30'
below: '800'
below: '2000'
for:
hours: 0
minutes: 2
@ -98,7 +101,7 @@
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '30'
below: '800'
below: '2000'
for:
hours: 0
minutes: 3
@ -133,7 +136,7 @@
trigger:
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '1500'
above: '2500'
for:
hours: 0
minutes: 1

View file

@ -0,0 +1,25 @@
- id: office-lights-on
alias: '[Office] Lights On'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_office
to: 'on'
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '200'
sequence:
- service: script.office_lights_on
- id: office-lights-off
alias: '[Office] Lights Off'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_office
to: 'off'
action:
- service: script.office_lights_off

View file

@ -0,0 +1,25 @@
- id: table-lights-on
alias: '[Table] Lights On'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_table
to: 'on'
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '200'
sequence:
- service: script.table_lights_on
- id: table-lights-off
alias: '[Table] Lights Off'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.presence_sensor_fp2_table
to: 'off'
action:
- service: script.table_lights_off

View file

@ -332,61 +332,15 @@ calendar:
username: pgrondek
password: !secret nextcloud_token
custom_calendars:
- name: "Sleep"
calendar: "Automations"
search: "Sleep"
- name: "Wakeup"
calendar: "Automations"
search: "Wakeup"
- 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
# decimals: 1
# period: 60
# log_spikes: False
# use_median: False
# active_scan: False
# bt_interface: 'DC:A6:32:F6:63:C3'
# report_unknown: False
# discovery: False
# devices:
# - name: 'Toothbrush'
# mac: '50:33:8b:1b:a1:9f'
# - 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 [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 Plant 1'
# mac: 'C4:7C:8D:6C:5B:25'
# - name: 'Thuja Plant 2'
# mac: 'C4:7C:8D:6C:9F:C6'
# - name: 'Thuja Plant 3'
# mac: 'C4:7C:8D:6C:9F:9B'
# - name: 'Living Room Plant 1'
# 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'
# - name: 'Freezer'
# mac: 'A4:C1:38:67:C8:76'
- "Formula 1"
sensor:
- platform: systemmonitor

View file

@ -135,6 +135,14 @@ good_morning:
target:
entity_id:
- climate.bedroom_thermostat
- choose:
- conditions:
- condition: state
entity_id: switch.3d_printer
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.3d_printer_light
mode: single
icon: mdi:weather-sunny
@ -241,5 +249,13 @@ arrive_home:
target:
entity_id:
- climate.office_thermostat
- choose:
- conditions:
- condition: state
entity_id: switch.3d_printer
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.3d_printer_light
mode: single
icon: mdi:home-import-outline

View file

@ -14,7 +14,6 @@ cctv_on:
- switch.living_room_detect
- switch.hallway_recordings
- switch.hallway_snapshots
- switch.hallway_detect
- service: switch.turn_on
target:
entity_id:
@ -36,7 +35,6 @@ cctv_off:
- switch.living_room_detect
- switch.hallway_recordings
- switch.hallway_snapshots
- switch.hallway_detect
cctv_snapshot_all:
alias: CCTV snapshot all

View file

@ -0,0 +1,66 @@
living_room_lights_toggle:
alias: '[Living Room] Lights toggle'
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.table_lamp_lights
state: 'on'
sequence:
living_room_ice: script.table_lights_off
- conditions:
- condition: state
entity_id: light.table_lamp_lights
state: 'off'
sequence:
living_room_ice: script.table_lights_on
living_room_lights_on:
alias: '[Living Room] Lights on'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.couch_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.couch_lights
data:
brightness_pct: 100
kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
data:
brightness_pct: 40
hs_color:
- 360
- 100
target:
entity_id: light.couch_lights
living_room_lights_off:
alias: '[Living Room] Lights off'
sequence:
- service: light.turn_off
entity_id: light.couch_lights