mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
Add meeting automations. Improve and combine AC automations
This commit is contained in:
@@ -25,6 +25,8 @@ cards:
|
||||
entities:
|
||||
- automation.titanium_turn_off_when_idle
|
||||
- automation.github_download
|
||||
- automation.speech_enable_when_meeting_is_over
|
||||
- automation.speech_disable_when_meeting_starts
|
||||
|
||||
- type: entities
|
||||
title: Presence
|
||||
@@ -147,9 +149,7 @@ cards:
|
||||
icon: mdi:air-purifier
|
||||
entities:
|
||||
- automation.climate_ac_turn_on_if_hot
|
||||
- automation.climate_ac_turn_off_if_window_opened
|
||||
- automation.climate_ac_turn_off_if_cold
|
||||
- automation.climate_ac_turn_off_if_working_at_night
|
||||
- automation.climate_ac_turn_off
|
||||
- type: divider
|
||||
- automation.purifier_on_start_sync_and_update_state
|
||||
- automation.purifier_change_speed
|
||||
|
||||
@@ -33,7 +33,9 @@ automation:
|
||||
entity_id: sensor.trisensor_temperature
|
||||
above: 24
|
||||
- platform: state
|
||||
entity_id: binary_sensor.living_room_right_window_on_off_wrapper
|
||||
entity_id:
|
||||
- binary_sensor.living_room_right_window_on_off_wrapper
|
||||
- binary_sensor.bedroom_right_window_on_off_wrapper
|
||||
from: "on"
|
||||
to: "off"
|
||||
condition:
|
||||
@@ -80,16 +82,24 @@ automation:
|
||||
message: "AC · Switching on · Above 24 degrees, windows closed"
|
||||
domain: climate
|
||||
|
||||
- alias: Climate · AC · Turn off if window opened
|
||||
- alias: Climate · AC · Turn off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.living_room_right_window_on_off_wrapper
|
||||
- platform: time
|
||||
at: "05:00:00"
|
||||
|
||||
# TODO: this below trigger works only for summer :)
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.trisensor_temperature
|
||||
below: 20
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.living_room_right_window_on_off_wrapper
|
||||
- binary_sensor.bedroom_right_window_on_off_wrapper
|
||||
from: "off"
|
||||
to: "on"
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
condition: template
|
||||
value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}"
|
||||
action:
|
||||
- service: climate.turn_off
|
||||
@@ -97,42 +107,5 @@ automation:
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "AC · Switching off · Window opene"
|
||||
domain: climate
|
||||
|
||||
- alias: Climate · AC · Turn off if cold
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.trisensor_temperature
|
||||
below: 20
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}"
|
||||
action:
|
||||
- service: climate.turn_off
|
||||
entity_id: climate.toshiba_ac
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "AC · Switching off · Below 20 degrees"
|
||||
domain: climate
|
||||
|
||||
- alias: Climate · AC · Turn off if working at night
|
||||
trigger:
|
||||
platform: time
|
||||
at: "05:00:00"
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}"
|
||||
action:
|
||||
- service: climate.turn_off
|
||||
entity_id: climate.toshiba_ac
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "AC · Switching off · It's 5 AM"
|
||||
message: "AC · Switching off"
|
||||
domain: climate
|
||||
|
||||
@@ -130,3 +130,23 @@ automation:
|
||||
data_template:
|
||||
message_id: "{{ trigger.event.data.message.message_id}}"
|
||||
chat_id: "{{ trigger.event.data.chat_id }}"
|
||||
|
||||
- alias: Speech · Disable when meeting starts
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.in_a_meeting
|
||||
from: "off"
|
||||
to: "on"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.speech_notifications
|
||||
|
||||
- alias: Speech · Enable when meeting is over
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.in_a_meeting
|
||||
from: "on"
|
||||
to: "off"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.speech_notifications
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
in_a_meeting:
|
||||
friendly_name: In a meeting
|
||||
value_template: >-
|
||||
|
||||
{% set slack_emoji = state_attr('sensor.slack_georgi', 'status_emoji') %}
|
||||
{% set slack_status = state_attr('sensor.slack_georgi', 'status_text') %}
|
||||
|
||||
{{ slack_emoji == ':spiral_calendar_pad:' or 'meeting' in slack_status.lower() }}
|
||||
Reference in New Issue
Block a user