Files
sarah/config/packages/modules/system.yaml
T
2020-05-06 04:32:08 +03:00

102 lines
2.7 KiB
YAML

input_boolean:
floorplan_night_mode:
initial: off
floorplan_show_all:
binary_sensor:
- platform: template
sensors:
floorplan_night_mode:
value_template: >-
{{ states('sun.sun') == 'below_horizon'
or is_state('input_boolean.floorplan_night_mode', 'on') }}
sensor:
- platform: command_line
name: Cobalt CPU Temperature
command: "cat /sys/class/thermal/thermal_zone3/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}'
- platform: time_date
display_options:
- "time"
- "date"
- platform: uptime
- platform: filesize
file_paths:
- /config/home-assistant_v2.db
- /config/home-assistant.log
- platform: template
sensors:
sarah_url:
friendly_name: "SARAH's URL"
value_template: !secret sarah_url
shell_command:
clear_logs: truncate -s 0 /config/home-assistant.log
script:
sarah_restart:
alias: System · Restart SARAH
sequence:
service: homeassistant.restart
automation:
- alias: System · Announce start
trigger:
platform: homeassistant
event: start
action:
- delay: 00:00:03
- service: script.say
data:
message: "Hey! I was out for a bit, but I'm back online!"
# - service: notify.telegram
# data:
# title: "⚙️ *System Module*"
# message: "Ask me to do something anytime!"
# data:
# keyboard:
# - "/guest_mode_on, /guest_mode_off"
# - "/status"
- alias: System · Telegram · Announce status
trigger:
platform: event
event_type: telegram_command
event_data:
command: "/status"
action:
- service: notify.telegram
data_template:
title: "⚙️ *System Module*"
message: >-
Guest mode: {{ states('input_boolean.guest_mode') }}
Windows:
Living room: {{ states('binary_sensor.living_room_right_window_on_off') }}
Master bedroom: {{ states('binary_sensor.bedroom_right_window_on_off') }}
Lights:
Living room: {{ states('light.living_room_all_lights') }}
Master bedroom: {{ states('light.master_bedroom_all_lights') }}
Kitchen: {{ states('light.kitchen_all_lights') }}
Hallway: {{ states('light.hallway_all_lights') }}
- alias: IFTTT · Call service
trigger:
platform: event
event_type: ifttt_webhook_received
event_data:
action: "call-service"
action:
- service_template: "{{ trigger.event.data.service }}"
data_template:
entity_id: "{{ trigger.event.data.entity_id }}"