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:
|
entities:
|
||||||
- automation.titanium_turn_off_when_idle
|
- automation.titanium_turn_off_when_idle
|
||||||
- automation.github_download
|
- automation.github_download
|
||||||
|
- automation.speech_enable_when_meeting_is_over
|
||||||
|
- automation.speech_disable_when_meeting_starts
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Presence
|
title: Presence
|
||||||
@@ -147,9 +149,7 @@ cards:
|
|||||||
icon: mdi:air-purifier
|
icon: mdi:air-purifier
|
||||||
entities:
|
entities:
|
||||||
- automation.climate_ac_turn_on_if_hot
|
- automation.climate_ac_turn_on_if_hot
|
||||||
- automation.climate_ac_turn_off_if_window_opened
|
- automation.climate_ac_turn_off
|
||||||
- automation.climate_ac_turn_off_if_cold
|
|
||||||
- automation.climate_ac_turn_off_if_working_at_night
|
|
||||||
- type: divider
|
- type: divider
|
||||||
- automation.purifier_on_start_sync_and_update_state
|
- automation.purifier_on_start_sync_and_update_state
|
||||||
- automation.purifier_change_speed
|
- automation.purifier_change_speed
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ automation:
|
|||||||
entity_id: sensor.trisensor_temperature
|
entity_id: sensor.trisensor_temperature
|
||||||
above: 24
|
above: 24
|
||||||
- platform: state
|
- 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"
|
from: "on"
|
||||||
to: "off"
|
to: "off"
|
||||||
condition:
|
condition:
|
||||||
@@ -80,59 +82,30 @@ automation:
|
|||||||
message: "AC · Switching on · Above 24 degrees, windows closed"
|
message: "AC · Switching on · Above 24 degrees, windows closed"
|
||||||
domain: climate
|
domain: climate
|
||||||
|
|
||||||
- alias: Climate · AC · Turn off if window opened
|
- alias: Climate · AC · Turn off
|
||||||
trigger:
|
trigger:
|
||||||
platform: state
|
- platform: time
|
||||||
entity_id: binary_sensor.living_room_right_window_on_off_wrapper
|
at: "05:00:00"
|
||||||
from: "off"
|
|
||||||
to: "on"
|
|
||||||
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 · Window opene"
|
|
||||||
domain: climate
|
|
||||||
|
|
||||||
- alias: Climate · AC · Turn off if cold
|
# TODO: this below trigger works only for summer :)
|
||||||
trigger:
|
- platform: numeric_state
|
||||||
platform: numeric_state
|
entity_id: sensor.trisensor_temperature
|
||||||
entity_id: sensor.trisensor_temperature
|
below: 20
|
||||||
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
|
- platform: state
|
||||||
trigger:
|
entity_id:
|
||||||
platform: time
|
- binary_sensor.living_room_right_window_on_off_wrapper
|
||||||
at: "05:00:00"
|
- binary_sensor.bedroom_right_window_on_off_wrapper
|
||||||
|
from: "off"
|
||||||
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
condition: and
|
condition: template
|
||||||
conditions:
|
value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}"
|
||||||
- condition: template
|
|
||||||
value_template: "{{ not is_state('climate.toshiba_ac', 'off') }}"
|
|
||||||
action:
|
action:
|
||||||
- service: climate.turn_off
|
- service: climate.turn_off
|
||||||
entity_id: climate.toshiba_ac
|
entity_id: climate.toshiba_ac
|
||||||
- service: logbook.log
|
- service: logbook.log
|
||||||
data:
|
data:
|
||||||
name: "💨 Climate Module · "
|
name: "💨 Climate Module · "
|
||||||
message: "AC · Switching off · It's 5 AM"
|
message: "AC · Switching off"
|
||||||
domain: climate
|
domain: climate
|
||||||
|
|||||||
@@ -130,3 +130,23 @@ automation:
|
|||||||
data_template:
|
data_template:
|
||||||
message_id: "{{ trigger.event.data.message.message_id}}"
|
message_id: "{{ trigger.event.data.message.message_id}}"
|
||||||
chat_id: "{{ trigger.event.data.chat_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