Browse Source

Add matrix + smtp notifications ; add sopine ac / ups ac statuses to notifications

master
KemoNine 2 years ago
parent
commit
7dadbd4622
  1. 2
      .gitignore
  2. 13
      automations/sopine_ac_status.yaml
  3. 13
      automations/ups_ac_status.yaml
  4. 7
      configuration.yaml
  5. 14
      secrets-example.yaml

2
.gitignore

@ -26,6 +26,8 @@ ToDo.md
OZW_Log.txt
host-id-rsa
core
matrix.yaml
smtp.yaml
!.github
!.gitignore

13
automations/sopine_ac_status.yaml

@ -0,0 +1,13 @@
- id: sopine_ac_status
alias: SOPine AC Status
trigger:
- platform: state
entity_id: sensor.sopine_ac
action:
- service: notify.smtp_notifications
data:
title: "SOPine AC Power Status Changed"
message: "AC Status: {{ is_state('sensor.sopine_ac_present', 'True') }}"
- service: notify.matrix_notifications
data:
message: "SOPine AC Power Status: {{ is_state('sensor.sopine_ac_present', 'True') }}"

13
automations/ups_ac_status.yaml

@ -0,0 +1,13 @@
- id: ups_ac_status
alias: UPS AC Status
trigger:
- platform: state
entity_id: sensor.ups_status
action:
- service: notify.smtp_notifications
data:
title: "UPS AC Power Status Changed"
message: "AC Status: {{ is_state('sensor.ups_status', 'ONLINE') }}"
- service: notify.matrix_notifications
data:
message: "UPS AC Power Status: {{ is_state('sensor.ups_status', 'ONLINE') }}"

7
configuration.yaml

@ -90,9 +90,12 @@ frontend:
# custom_ui: local
# Matrix base config
matrix: !include matrix.yaml
# Notification services
# https://home-assistant.io/components/notify/
#notify: !include_dir_merge_list notifications/
notify: !include_dir_merge_list notifications/
# Enables Default Home Assistant Components

14
secrets-example.yaml

@ -19,6 +19,20 @@ recorder_db_url: "postgresql://user:password@SERVER_IP/DB_NAME"
# API Keys
dark_sky_api_key: YOUR_API_KEY_HERE
# SMTP
smtp_server: smtp.gmail.com
smtp_port: 587
smtp_sender: john@gmail.com
smtp_encryption: starttls
smtp_username: john@gmail.com
smtp_password: thePassword
smtp_recipient:
- james@gmail.com
- bob@gmail.com
# Matrix
matrix_default_room: "#ha:domain.tld"
# Z-Wave
zwave_network_key: 'big long string (see docs for generation)'

Loading…
Cancel
Save