diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2023-01-21 01:27:13 +0400 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2023-01-21 01:27:13 +0400 |
commit | 614c8a5f4e3bf26d3af0a91685e00eecb171339b (patch) | |
tree | 94a94b63fb3e10a1ec4bf132bd5e3dde4dafae3b /automations.yaml | |
parent | 2c0c331eb7b7a03152309bbbd4e0fee157e8d86c (diff) | |
download | hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.tar.gz hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.tar.bz2 hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.tar.xz hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.zip |
Media controls, occupancy tracking, and fixes
Diffstat (limited to 'automations.yaml')
-rw-r--r-- | automations.yaml | 187 |
1 files changed, 145 insertions, 42 deletions
diff --git a/automations.yaml b/automations.yaml index 3e183c3..efe9950 100644 --- a/automations.yaml +++ b/automations.yaml @@ -19,7 +19,7 @@ domain: binary_sensor for: hours: 0 - minutes: 20 + minutes: 10 seconds: 0 id: Toilet - type: no_motion @@ -28,8 +28,8 @@ entity_id: binary_sensor.hall_motions_occupancy domain: binary_sensor for: - hours: 1 - minutes: 0 + hours: 0 + minutes: 40 seconds: 0 id: Long - type: no_motion @@ -283,33 +283,30 @@ - condition: trigger id: left_dbl sequence: - - if: - - condition: state - entity_id: input_boolean.mode_alone - state: 'off' - then: - - parallel: - - service: script.sleep_and_wake - data: - mode: sleep - target: office - else: - - parallel: + - parallel: + - service: switch.turn_off + target: + entity_id: + - switch.lights_living + - service: script.sleep_and_wake + data: + mode: hibernate + target: office + - if: + - condition: state + entity_id: input_boolean.mode_guests + state: 'off' + then: - service: switch.turn_off data: {} target: entity_id: - - switch.lights_living - switch.lights_guest - switch.lights_temporary - - service: script.sleep_and_wake - data: - mode: hibernate - target: office - - service: input_button.press - data: {} - target: - entity_id: input_button.button_confirm + - service: input_button.press + data: {} + target: + entity_id: input_button.button_confirm - conditions: - condition: trigger id: left_hold @@ -527,6 +524,11 @@ on_click: [] off_click: [] dblclick: + - service: switch.turn_on + target: + entity_id: switch.hall_lights_right + data: {} + enabled: false - service: script.sleep_and_wake data: mode: sleep @@ -535,7 +537,6 @@ data: {} target: entity_id: input_button.button_confirm - enabled: false - id: '1672627582279' alias: 'Hall: Kitchen Combo' description: '' @@ -619,7 +620,7 @@ target: entity_id: input_button.button_confirm - id: '1672972431474' - alias: Knob Office Bulb Control + alias: 'Office: Knob Office Bulb Control' description: '' use_blueprint: path: lights/knob-bulb-control.yaml @@ -627,6 +628,17 @@ light: light.yeelight_color_0x7caaf86 knob: sensor.office_knob_action toggle: + - if: + - condition: device + type: is_on + device_id: 32787706a8ff87380633b7c817057935 + entity_id: switch.living_tablelamp + domain: switch + then: + - service: switch.turn_off + data: {} + target: + entity_id: switch.lights_living_lustre - type: toggle device_id: 32787706a8ff87380633b7c817057935 entity_id: switch.living_tablelamp @@ -636,7 +648,7 @@ hue: input_number.knob_office_hue0 state: input_boolean.state_office_knob_pressed - id: '1672979291802' - alias: Knob Multi-Bulb Control + alias: 'Office: Knob Multi-Bulb Control' description: '' use_blueprint: path: lights/knob-multi-bulb-control.yaml @@ -693,14 +705,22 @@ entity_id: switch.smart_power_strip_pro_socket_1 state: 'off' then: - - service: script.sleep_and_wake - data: - mode: wake - target: office - - service: homeassistant.turn_off - data: {} - target: - entity_id: switch.lights_living_lustre + - parallel: + - service: script.sleep_and_wake + data: + mode: wake + target: office + - if: + - condition: numeric_state + entity_id: sun.sun + attribute: elevation + below: '5' + then: + - service: script.turn_on_office_lights + data: {} + else: + - service: script.turn_on_office_lights + data: {} dblclick: - if: - condition: state @@ -753,6 +773,8 @@ target: entity_id: input_button.button_confirm data: {} + temperature: 6000 + on_light: 'no' - id: '1672991247298' alias: 'Living: Light Sync' description: '' @@ -778,10 +800,10 @@ light_target: - switch.kitchen_lights_left - switch.kitchen_lights_center - motion_entity: binary_sensor.kitchen_motions_occupancy + motion_entity: binary_sensor.motions_kitchen illumination_test: sensor illuminance_entity: sensor.kitchen_motions_illuminance_lux - lux_threshold: 30 + lux_threshold: 40 - id: '1673037015865' alias: 'Motions: Night Light' description: '' @@ -826,9 +848,8 @@ device_id: 87071fc9d8fb9ebbccb145f5642c7404 entity_id: light.aqara_hub_m1s_426c domain: light - brightness_pct: 100 - id: '1673153262822' - alias: 'Motions: Global ' + alias: 'Motions: Global v1' description: '' trigger: - platform: state @@ -903,7 +924,7 @@ - condition: trigger id: away - condition: state - entity_id: input_boolean.mode_single + entity_id: input_boolean.mode_alone state: 'on' - condition: state entity_id: binary_sensor.hall_motions_occupancy @@ -940,10 +961,10 @@ - condition: trigger id: home sequence: - - service: input_boolean.turn_off + - service: switch.turn_off data: {} target: - entity_id: input_boolean.mode_away + entity_id: switch.hall_lights_right - conditions: - condition: or conditions: @@ -1055,3 +1076,85 @@ target: entity_id: scene.sven_power_switch mode: single +- id: '1673329841884' + alias: 'Motions: Toilet' + description: '' + use_blueprint: + path: motion/occupancy_tracking.yaml + input: + occupancy: input_boolean.occupancy_toilet + entrance: binary_sensor.toilet_door_contact + inside: binary_sensor.toilet_motions_occupancy + light: switch.entrance_lights_left + on_action: + - type: turn_on + device_id: 07b7086cf34752386c82a5109311ac6e + entity_id: switch.entrance_lights_left + domain: switch + reentry_wait: 10 + reentry_timeout: 45 +- id: '1673331563280' + alias: 'Motions: Bathroom' + description: '' + use_blueprint: + path: motion/occupancy_tracking.yaml + input: + entrance: binary_sensor.bathroom_motions_occupancy + inside: binary_sensor.bathroom_motions_occupancy + light: switch.bathroom_lights_left + occupancy: input_boolean.occupancy_bathroom + on_action: + - type: turn_on + device_id: 04c6f563c006599ed7754aba652654ae + entity_id: switch.bathroom_lights_left + domain: switch + reentry_wait: 5 + reentry_timeout: 30 +- id: '1674140368136' + alias: 'Office: Sven Scene Switch' + description: '' + use_blueprint: + path: media/sven_scene_switch.yaml + input: + switch_action: sensor.living_scene_switch_action + media_player: media_player.smartpi + playlist_control: input_number.smartpi_playlist + power_scene: scene.sven_power_switch +- id: '1674146213954' + alias: 'Motions: Global v2' + description: '' + use_blueprint: + path: motion/halabyan24.yaml +- id: '1674208339037' + alias: 'Office: Knob Sound-Bulb Control' + description: '' + use_blueprint: + path: lights/knob-sound-multi-bulb-control.yaml + input: + knob: sensor.office_knob_action + lights: + - light.yeelight_color_0x7caaf86 + media_player: media_player.smartpi + toggle_actions: + - choose: + - conditions: + - condition: template + value_template: '{{ current_num == 0 }}' + sequence: + - if: + - condition: device + type: is_on + device_id: 32787706a8ff87380633b7c817057935 + entity_id: switch.living_tablelamp + domain: switch + then: + - service: switch.turn_off + data: {} + target: + entity_id: switch.lights_living_lustre + enabled: false + - type: toggle + device_id: 32787706a8ff87380633b7c817057935 + entity_id: switch.living_tablelamp + domain: switch + default: [] |