From 035ebd64dc61cc94062303b93a4d98a29c9a3290 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sat, 11 Nov 2023 10:13:17 +0100 Subject: [PATCH] change `notification_show` parameter to `message` For compatibility with ESPHome 2023.11. Solves #1247 --- ReleaseNotes.md | 5 ++++- nspanel_esphome_core.yaml | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 527f599..d86de6b 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -69,7 +69,10 @@ packages: If you have a custom automation using very long hold (more than 15s) of hardware buttons it may fail as now the panel will restart with button hold for 15s. 4. Logger via UART is disable -You can add it back as a [customization](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/%28EN%29-Customization/_edit#logger-via-uart): +You can add it back as a [customization](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/%28EN%29-Customization/_edit#logger-via-uart). + +5. Service `notification_show` parameter `text` was renamed to `message` to support ESPHome 2023.11.0. +   ## Overview of noteworthy changes 1. New Upload TFT engine diff --git a/nspanel_esphome_core.yaml b/nspanel_esphome_core.yaml index 0119f86..e59020b 100644 --- a/nspanel_esphome_core.yaml +++ b/nspanel_esphome_core.yaml @@ -364,7 +364,7 @@ api: - service: notification_show variables: label: string - text: string + message: string then: - lambda: |- ESP_LOGV("service.notification_show", "Starting"); @@ -373,10 +373,10 @@ api: disp1->goto_page("notification"); disp1->set_component_text_printf("notification.notifi_label", "%s", label.c_str()); - display_wrapped_text->execute("notification.notifi_text01", text.c_str(), id(display_mode) == 2 ? 23 : 32); + display_wrapped_text->execute("notification.notifi_text01", message.c_str(), id(display_mode) == 2 ? 23 : 32); notification_label->publish_state(label.c_str()); - notification_text->publish_state(text.c_str()); + notification_text->publish_state(message.c_str()); timer_reset_all->execute(current_page->state.c_str()); notification_unread->turn_on(); if (notification_sound->state) buzzer->play("two short:d=4,o=5,b=100:16e6,16e6");