Add calendar automation
This commit is contained in:
parent
68648a29f4
commit
861d417b4c
2 changed files with 51 additions and 5 deletions
36
configuration/automations/calendar.yaml
Normal file
36
configuration/automations/calendar.yaml
Normal file
|
@ -0,0 +1,36 @@
|
|||
- id: calendar-coffee-machine-off
|
||||
alias: "[Calendar] Coffee machine"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: calendar.automations_caffeine_free_time
|
||||
to: 'on'
|
||||
- platform: state
|
||||
entity_id: calendar.automations_sleep
|
||||
to: 'on'
|
||||
action:
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.coffee_machine_on_off
|
||||
|
||||
- id: calendar-coffee-machine-on
|
||||
alias: "[Calendar] Coffee machine"
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: calendar.automations_caffeine_free_time
|
||||
to: 'off'
|
||||
- platform: state
|
||||
entity_id: calendar.automations_sleep
|
||||
to: 'off'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: calendar.automations_caffeine_free_time
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: calendar.automations_sleep
|
||||
state: 'off'
|
||||
action:
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.coffee_machine_on_off
|
|
@ -184,11 +184,21 @@ tplink:
|
|||
switch:
|
||||
- host: '192.168.60.14'
|
||||
|
||||
#calendar:
|
||||
# - platform: caldav
|
||||
# url: https://cloud.grondek.pl/remote.php/dav
|
||||
# username: pgrondek
|
||||
# password: !secret nextcloud_token
|
||||
calendar:
|
||||
- platform: caldav
|
||||
url: https://cloud.grondek.pl/remote.php/dav
|
||||
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"
|
||||
|
||||
ble_monitor:
|
||||
# Xiaomi BT Sensors
|
||||
|
|
Loading…
Reference in a new issue