Merge branch 'dev' into patch-1

This commit is contained in:
Edward Firmo
2023-11-28 21:17:04 +01:00
committed by GitHub
96 changed files with 326 additions and 842 deletions

View File

@@ -7,7 +7,7 @@
substitutions:
##### DON'T CHANGE THIS #####
version: "4.1.2"
version: "4.2dev"
#############################
external_components:
@@ -190,9 +190,8 @@ api:
variables:
component: string
foreground: int[]
background: int[]
then:
- lambda: set_component_color->execute(component, foreground, background);
- lambda: set_component_color->execute(component, foreground, {});
##### Service to play a rtttl tones #####
# Example tones : https://codebender.cc/sketch:109888#RTTTL%20Songs.ino
@@ -747,11 +746,14 @@ display:
platform: nextion
uart_id: tf_uart
start_up_page: 8
on_page: # This requires `sendme` to be executed on Nextion side
on_page:
lambda: |-
static const char *const TAG = "display.disp1.on_page";
ESP_LOGD(TAG, "Nextion page changed");
ESP_LOGD(TAG, "New page: %s (%i)" , id(page_names)[x].c_str(), x);
current_page->publish_state(id(page_names)[x].c_str());
page_changed->execute(id(page_names)[x].c_str());
on_setup:
- script.execute: boot_sequence
@@ -1398,25 +1400,25 @@ text_sensor:
##### Current page name #####
- name: ${device_name} Current page
id: current_page
#platform: template
platform: nextion
nextion_id: disp1
component_name: currentpage
platform: template
#platform: nextion
#nextion_id: disp1
#component_name: currentpage
icon: mdi:tablet-dashboard
internal: false
disabled_by_default: false
filters:
- lambda: |-
x = x.c_str();
x.shrink_to_fit();
return x;
on_value:
then:
- lambda: |-
static const char *const TAG = "text_sensor.current_page";
// Construct new page
ESP_LOGV(TAG, "Construct new page");
page_changed->execute(x.c_str());
#filters:
# - lambda: |-
# x = x.c_str();
# x.shrink_to_fit();
# return x;
#on_value:
# then:
# - lambda: |-
# static const char *const TAG = "text_sensor.current_page";
# // Construct new page
# ESP_LOGV(TAG, "Construct new page");
# page_changed->execute(x.c_str());
- name: ${device_name} Notification Label
platform: template