diff --git a/.gitignore b/.gitignore index ed95e00..7012253 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,8 @@ ToDo.md OZW_Log.txt host-id-rsa core +matrix.yaml +smtp.yaml !.github !.gitignore diff --git a/automations/sopine_ac_status.yaml b/automations/sopine_ac_status.yaml new file mode 100644 index 0000000..4c9aa2c --- /dev/null +++ b/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') }}" diff --git a/automations/ups_ac_status.yaml b/automations/ups_ac_status.yaml new file mode 100644 index 0000000..bf0a10e --- /dev/null +++ b/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') }}" diff --git a/configuration.yaml b/configuration.yaml index 8f22c31..eeb70f8 100644 --- a/configuration.yaml +++ b/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 diff --git a/secrets-example.yaml b/secrets-example.yaml index 530d6ca..d9b1943 100644 --- a/secrets-example.yaml +++ b/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)'