Skip to content

Commit

Permalink
Triggers HA event when button is pressed on page notification
Browse files Browse the repository at this point in the history
Solves #2344
  • Loading branch information
edwardtfn committed Oct 23, 2024
1 parent bbb9314 commit d1b0695
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions esphome/nspanel_esphome_core_page_notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ display:
if (page_id == 16) { // Page Notification
switch (component_id) {
case 7: // bt_accept
ha_button->execute("notification", "bt_accept", touch_event ? "press" : "released");
if (!touch_event) { // Release
notification_label->publish_state("");
notification_text->publish_state("");
Expand All @@ -57,6 +58,7 @@ display:
}
break;
case 8: // bt_clear
ha_button->execute("notification", "bt_clear", touch_event ? "press" : "released");
if (!touch_event) { // Release
notification_unread->turn_off();
goto_page->execute("home", false);
Expand Down

0 comments on commit d1b0695

Please sign in to comment.