From f62b2e2e8e386856c49f6a1ff13de24ccf37847d Mon Sep 17 00:00:00 2001 From: hollabee Date: Mon, 30 Jan 2023 11:06:00 +0100 Subject: [PATCH] Update wiki - Notifications --- ...e-wichtigen-Dinge-die-man-wissen-sollte.md | 40 ++++++++++++++++-- ...o---All-important-thing-you-should-know.md | 42 ++++++++++++++++++- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.md b/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.md index 85fa110..825041f 100644 --- a/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.md +++ b/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.md @@ -22,7 +22,7 @@ In diesem Beitrag werden wir alle wichtigen Dinge zu verschiedenen Themen zusamm 1. [Update TFT](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte#4-update-tft) 1. Manueller TFT Upload über lokalen HA (in Arbeit) 1. Upload TFT Fehler und Lösung (in Arbeit) -1. Notification via HA (in Arbeit) +1. [Notification via HA](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte#7-notification-via-ha) 1. [Climate für Relays](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte#8-climate-für-relays) 1. [Interne Switches als Lampe darstellen in HA](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte#9-interne-switches-als-lampe-darstellen-in-ha) 1. Schnell Navigation (in Arbeit) @@ -140,7 +140,41 @@ In Arbeit ## 7. Notification via HA -In Arbeit +Um eine Notification auf dem NSPanel anzeigen zu lassen, kann folgender Service Call verwendet werden: + +``` +service: esphome.panelname_notification_show +data: + label: Example text + text: Example text +``` + +Um die Notifications auf dem Panel zu bestätigen, kann folgender Service Call verwendet werden: + +``` +service: esphome.panelname_notification_clear +data: {} +``` + + +Die Notifications können einfach in eine Automation mit aufgenommen werden: + +``` +description: "" +mode: single +trigger: + - platform: state + entity_id: + - binary_sensor.motion_detector + to: "on" + condition: [] + action: + - service: esphome.panelname_notification_show + data: + label: Motion Detected + text: Example for a Notification on the Panel Screen +``` + ------ @@ -154,7 +188,7 @@ Beispielkonfiguration Generic Thermostat: climate: - platform: generic_thermostat name: Study - heater: switch.study_heater ## Wenn das NSPanel Relays den Heizkreis Regler schaltet, kann dieses hier definiert werden + heater: switch.study_heater ## Wenn das NSPanel Relays den Heizkreis Regler schaltet, kann dieser hier definiert werden target_sensor: sensor.study_temperature ## Hier kann der NSPanel Sensor verwendet werden min_temp: 15 max_temp: 21 diff --git a/(EN)-HowTo---All-important-thing-you-should-know.md b/(EN)-HowTo---All-important-thing-you-should-know.md index f7562e0..4adfcc3 100644 --- a/(EN)-HowTo---All-important-thing-you-should-know.md +++ b/(EN)-HowTo---All-important-thing-you-should-know.md @@ -25,7 +25,7 @@ In this post we will collect all the important things about different topics tha 4. [Update TFT](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#4-update-tft) 5. Manual TFT upload via local HA (coming soon) 6. Upload TFT error and solution (coming soon) -7. Notification via HA (coming soon) +7. [Notification via HA](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#7-notification-via-ha) 8. [Climate control with relays](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#8-climate-control-with-relays) 9. [Display internal switches as lamp in HA](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#9-display-internal-switches-as-lamp-in-ha) 10. Quick navigation (coming soon) @@ -146,7 +146,45 @@ coming soon ## 7. Notification via HA -coming soon +To show a notification on the NSPAnel, the following service call can be used: + +``` +service: esphome.panelname_notification_show +data: + label: Example text + text: Example text +``` + +To clear any notifications, the following service call can be used: + +``` +service: esphome.panelname_notification_clear +data: {} +``` + + +To use the notifications in an automation, again simply use the service call as shown in the example below: + +``` +description: "" +mode: single +trigger: + - platform: state + entity_id: + - binary_sensor.motion_detector + to: "on" + condition: [] + action: + - service: esphome.panelname_notification_show + data: + label: Motion Detected + text: Example for a Notification on the Panel Screen +``` + + +------ + +## ------