1
0

Compare commits

..

5 Commits

13 changed files with 220 additions and 259 deletions

View File

@ -59,7 +59,6 @@ battery:
- sensor.office_blind_button_battery
- sensor.office_illuminance_sensor_battery
- sensor.office_keylight_button_battery
- sensor.office_motion_sensor_battery
- sensor.office_sensor_battery
- sensor.office_thermostat_battery
- sensor.office_thermostat_battery_level

View File

@ -140,7 +140,6 @@
images:
- "/config/www/cctv/living_room.mp4"
- id: alarm_away_bedroom
alias: '[Alarm] Trigger alarm when not at home (Bedroom)'
trigger:
@ -326,4 +325,4 @@
target:
entity_id: switch.siren_alarm
- service: switch.turn_on
entity_id: switch.siren_switch
entity_id: switch.siren_switch

View File

@ -1,84 +0,0 @@
- id: bathroom_music_button_next
alias: '[Bathroom] Music button - next'
mode: single
trigger:
- device_id: e233cdffb05076ad7bb049581ffa8c9c
domain: zha
platform: device
type: remote_button_double_press
subtype: remote_button_double_press
- device_id: ea9d3cc90cf5da1108925e50489efce9
domain: zha
platform: device
type: remote_button_alt_double_press
subtype: button_2
condition:
- condition: state
entity_id: media_player.bathroom
state: playing
action:
- service: media_player.media_next_track
target:
entity_id: media_player.bathroom
- id: bathroom_music_play_playlist
alias: '[Bathroom] Play playlist'
mode: single
trigger:
- device_id: e233cdffb05076ad7bb049581ffa8c9c
domain: zha
platform: device
type: remote_button_long_press
subtype: button
- device_id: ea9d3cc90cf5da1108925e50489efce9
domain: zha
platform: device
type: remote_button_alt_long_press
subtype: button_2
action:
- service: media_player.shuffle_set
entity_id: media_player.bathroom
data:
shuffle: true
- service: script.bathroom_music_play
- id: bathroom_music_button_play
alias: '[Bathroom] Music button - play'
mode: single
trigger:
- device_id: e233cdffb05076ad7bb049581ffa8c9c
domain: zha
platform: device
type: remote_button_double_press
subtype: remote_button_double_press
- device_id: ea9d3cc90cf5da1108925e50489efce9
domain: zha
platform: device
type: remote_button_alt_double_press
subtype: button_2
condition:
- condition: not
conditions:
- condition: state
entity_id: media_player.bathroom
state: playing
action:
- service: script.bathroom_music_play
- id: bathroom_music_button_pause
alias: '[Bathroom] Music button - play/pause'
description: ''
mode: single
trigger:
- device_id: e233cdffb05076ad7bb049581ffa8c9c
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
- device_id: ea9d3cc90cf5da1108925e50489efce9
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_2
action:
- service: script.bathroom_music_toggle

View File

@ -1,19 +1,3 @@
- id: behaviour_pc_caffeine
alias: '[Behaviour] PC caffeine'
mode: single
trigger:
- platform: state
entity_id:
- input_boolean.pc_caffeine
to: "on"
condition: [ ]
action:
- service: light.turn_on
data:
color_name: green
target:
entity_id: light.notification_cube_light
- id: goto_sleep
alias: '[Behaviour] Go to sleep'
mode: single
@ -44,11 +28,6 @@
data:
title: "Sleep notifier"
message: "Go to sleep, computer will turn off in 5 minutes"
- service: light.turn_on
data:
color_name: orange
target:
entity_id: light.notification_cube_light
- delay: '0:05:00'
- choose:
- conditions:
@ -79,17 +58,6 @@
- service: input_boolean.turn_off
target:
entity_id: input_boolean.pc_caffeine
- choose:
- conditions:
- condition: state
entity_id: input_boolean.pc_caffeine
state: 'off'
sequence:
- service: light.turn_on
data:
color_name: yellow
target:
entity_id: light.notification_cube_light
- service: light.turn_off
target:
entity_id: light.office_light_up
@ -120,11 +88,6 @@
- 0
target:
entity_id: light.office_light_up
- service: light.turn_on
data:
color_name: red
target:
entity_id: light.notification_cube_light
- service: light.turn_on
data:
rgb_color:

View File

@ -14,9 +14,6 @@
actions:
- action: UNLOCK_DOOR
title: Unlock door
- service: light.turn_on
target:
entity_id: light.notification_cube_light
- service: zha.issue_zigbee_cluster_command
data:
cluster_type: in

View File

@ -55,132 +55,132 @@
entity_id: light.bathroom_color_zha_group_0x0007
mode: single
- id: work_start
alias: '[Work] Start'
trigger:
- platform: time
at: '10:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: light.turn_on
data:
color_name: green
target:
entity_id: light.notification_cube_light
mode: single
#- id: work_start
# alias: '[Work] Start'
# trigger:
# - platform: time
# at: '10:00'
# condition:
# - condition: time
# weekday:
# - mon
# - tue
# - wed
# - thu
# - fri
# action:
# - service: light.turn_on
# data:
# color_name: green
# target:
# entity_id: light.notification_cube_light
# mode: single
- id: work_daily_minus_30m
alias: '[Work] Daily -30m'
trigger:
- platform: calendar
event: start
offset: '-0:30:0'
entity_id: calendar.automations_daily
action:
- service: light.turn_on
data:
color_name: yellow
transition: 2
target:
entity_id: light.notification_cube_light
#- id: work_daily_minus_30m
# alias: '[Work] Daily -30m'
# trigger:
# - platform: calendar
# event: start
# offset: '-0:30:0'
# entity_id: calendar.automations_daily
# action:
# - service: light.turn_on
# data:
# color_name: yellow
# transition: 2
# target:
# entity_id: light.notification_cube_light
- id: work_daily_minus_15m
alias: '[Work] Daily -15m'
trigger:
- platform: calendar
event: start
offset: '-0:15:0'
entity_id: calendar.automations_daily
action:
- service: light.turn_on
data:
color_name: orange
transition: 2
target:
entity_id: light.notification_cube_light
#- id: work_daily_minus_15m
# alias: '[Work] Daily -15m'
# trigger:
# - platform: calendar
# event: start
# offset: '-0:15:0'
# entity_id: calendar.automations_daily
# action:
# - service: light.turn_on
# data:
# color_name: orange
# transition: 2
# target:
# entity_id: light.notification_cube_light
- id: work_daily_minus_5m
alias: '[Work] Daily -5m'
trigger:
- platform: calendar
event: start
offset: '-0:5:0'
entity_id: calendar.automations_daily
action:
- service: light.turn_on
data:
color_name: purple
target:
entity_id: light.notification_cube_light
#- id: work_daily_minus_5m
# alias: '[Work] Daily -5m'
# trigger:
# - platform: calendar
# event: start
# offset: '-0:5:0'
# entity_id: calendar.automations_daily
# action:
# - service: light.turn_on
# data:
# color_name: purple
# target:
# entity_id: light.notification_cube_light
- id: work_daily_start
alias: '[Work] Daily'
trigger:
- platform: calendar
event: start
entity_id: calendar.automations_daily
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: light.turn_on
data:
color_name: red
target:
entity_id: light.notification_cube_light
#- id: work_daily_start
# alias: '[Work] Daily'
# trigger:
# - platform: calendar
# event: start
# entity_id: calendar.automations_daily
# condition:
# - condition: time
# weekday:
# - mon
# - tue
# - wed
# - thu
# - fri
# action:
# - service: light.turn_on
# data:
# color_name: red
# target:
# entity_id: light.notification_cube_light
- id: work_dailY_end
alias: '[Work] Daily end'
trigger:
- platform: calendar
event: end
entity_id: calendar.automations_daily
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: light.turn_on
data:
color_name: green
target:
entity_id: light.notification_cube_light
mode: single
#- id: work_dailY_end
# alias: '[Work] Daily end'
# trigger:
# - platform: calendar
# event: end
# entity_id: calendar.automations_daily
# condition:
# - condition: time
# weekday:
# - mon
# - tue
# - wed
# - thu
# - fri
# action:
# - service: light.turn_on
# data:
# color_name: green
# target:
# entity_id: light.notification_cube_light
# mode: single
- id: work_end
alias: '[Work] End'
trigger:
- platform: time
at: '18:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: light.turn_off
target:
entity_id: light.notification_cube_light
mode: single
#- id: work_end
# alias: '[Work] End'
# trigger:
# - platform: time
# at: '18:00'
# condition:
# - condition: time
# weekday:
# - mon
# - tue
# - wed
# - thu
# - fri
# action:
# - service: light.turn_off
# target:
# entity_id: light.notification_cube_light
# mode: single
- id: work_cool_down_home
alias: '[Work] Cool down home after leaving work'

View File

@ -35,6 +35,16 @@
name: Desk Lightbar
- entityId: light.office
name: Table lamp
- name: Build music button automations
delegate_to: localhost
template:
src: music-button.yaml.j2
dest: './build/automations/music.yaml'
vars:
room: Bathroom
room_id: bathroom
device_id: ea9059ad2df037a012ab01a575108dc5
player_entity_id: media_player.bathroom
- name: Include ZHA vars
include_vars:
file: zha-devices.yml

View File

@ -88,7 +88,6 @@ good_night:
- light.balcony
- light.table_lamp_lights
- light.lego_bookcase_light
- light.notification_cube_light
before_wakeup:
alias: Before wakeup
@ -240,7 +239,6 @@ leave_home:
- light.balcony
- light.table_lamp_lights
- light.lego_bookcase_light
- light.notification_cube_light
arrive_home:
alias: Arrive Home

View File

@ -23,8 +23,9 @@
- {{ entity }}
{% endfor %}
action:
- service: notify.mobile_app_iphone
- service: notify.home_assistant
data:
title: "Low battery"
message: >
Low battery
{% raw %}{{ device_attr(trigger.entity_id, 'name_by_user') }} has low battery {{ states(trigger.entity_id) }}% {% endraw %}
target: [ "1070507369164984372" ]

View File

@ -0,0 +1,80 @@
- id: {{ room_id }}_music_button
alias: "[{{ room }}] Music button"
mode: single
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: {{ device_id }}
condition: [ ]
action:
- choose:
- conditions:
{% raw %}
- condition: template
value_template: "{{ trigger.event.data.command == 'toggle' }}"
- condition: template
value_template: "{{ trigger.event.data.cluster_id == 6 }}"
- condition: template
value_template: "{{ trigger.event.data.endpoint_id == 1 }}"
{% endraw %}
sequence:
- service: media_player.media_play_pause
target:
entity_id: {{ player_entity_id }}
- conditions:
{% raw %}
- condition: template
value_template: "{{ trigger.event.data.command == 'step' }}"
- condition: template
value_template: "{{ trigger.event.data.cluster_id == 8 }}"
- condition: template
value_template: "{{ trigger.event.data.endpoint_id == 1 }}"
- condition: template
value_template: "{{ trigger.event.data.params.step_mode == 0 }}"
{% endraw %}
sequence:
- service: media_player.media_next_track
entity_id: {{ player_entity_id }}
- conditions:
{% raw %}
- condition: template
value_template: "{{ trigger.event.data.command == 'step' }}"
- condition: template
value_template: "{{ trigger.event.data.cluster_id == 8 }}"
- condition: template
value_template: "{{ trigger.event.data.endpoint_id == 1 }}"
- condition: template
value_template: "{{ trigger.event.data.params.step_mode == 1 }}"
{% endraw %}
sequence:
- service: media_player.media_previous_track
entity_id: {{ player_entity_id }}
- conditions:
{% raw %}
- condition: template
value_template: "{{ trigger.event.data.command == 'move_with_on_off' }}"
- condition: template
value_template: "{{ trigger.event.data.cluster_id == 8 }}"
- condition: template
value_template: "{{ trigger.event.data.endpoint_id == 1 }}"
- condition: template
value_template: "{{ trigger.event.data.params.move_mode == 0}}"
{% endraw %}
sequence:
- service: media_player.volume_up
entity_id: {{ player_entity_id }}
- conditions:
{% raw %}
- condition: template
value_template: "{{ trigger.event.data.command == 'move_with_on_off' }}"
- condition: template
value_template: "{{ trigger.event.data.cluster_id == 8 }}"
- condition: template
value_template: "{{ trigger.event.data.endpoint_id == 1 }}"
- condition: template
value_template: "{{ trigger.event.data.params.move_mode == 1 }}"
{% endraw %}
sequence:
- service: media_player.volume_down
entity_id: {{ player_entity_id }}

View File

@ -11,8 +11,9 @@
subtype: device_offline
{% endfor %}
action:
- service: notify.mobile_app_iphone
- service: notify.home_assistant
data:
title: "Device unavailable"
message: >
Device unavailable
{% raw %}{{ device_attr(trigger.event.data.device_id, 'name_by_user') }}{% endraw %} is unavailable
target: [ "1070507369164984372" ]

View File

@ -9,8 +9,9 @@
- {{ device.entity_id }} # {{ device.name }}
{% endfor %}
action:
- service: notify.mobile_app_iphone
- service: notify.home_assistant
data:
title: "Device unavailable"
message: >
Device unavailable
{% raw %}{{ device_attr(device_id(trigger.event.data.device_id), 'name_by_user') }}{% endraw %} is unavailable
target: [ "1070507369164984372" ]

View File

@ -41,8 +41,6 @@ devices:
id: '54858d52b175bc720641cf916d513488'
- name: 'Humidifier leak'
id: '45887888b0b9ea753953c93194ba49f0'
- name: 'Office Motion Sensor'
id: '5dc8b6e216588033d4d31d8c3d561d70'
- name: 'Office Window Vibration Sensor'
id: 'f5e5356b4a45190ec2dad08ca9f991e8'
- name: 'Dining Plants Leak Sensor'
@ -57,8 +55,6 @@ devices:
id: 'ba7b7736a67d7cbe1243c4600ff7172a'
- name: '3D Printer button'
id: 'a2ac0fa69738b8e7c5c1b8b8bcf8cdc2'
- name: 'Bathroom Music Button'
id: 'e233cdffb05076ad7bb049581ffa8c9c'
- name: 'Bathroom 2'
id: '5b73436727bfa8200c7679fc74bf4ed6'
- name: 'Bathroom 3'