2 Commits

Author SHA1 Message Date
Edward Firmo
60b14d5315 add page_names array 2023-11-25 17:49:22 +01:00
Edward Firmo
48c5453f0a Add compatibility to IDF v5 2023-11-25 17:30:10 +01:00
3 changed files with 76 additions and 16 deletions

View File

@@ -105,6 +105,18 @@ jobs:
with:
yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf.yaml"
build_climate_cool_advanced_esp_idf5:
name: esp-idf v5 & Bluetooth proxy
runs-on: "ubuntu-latest"
needs:
- build_climate_cool_advanced_esp_idf
steps:
- uses: actions/checkout@v4.1.0
- name: Build core+advanced+climate_cool+esp_idf5
uses: esphome/build-action@v1.8.0
with:
yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf5.yaml"
build_climate_heat_advanced_customization:
name: Customizations
runs-on: "ubuntu-latest"

View File

@@ -108,6 +108,19 @@ jobs:
yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf.yaml"
version: beta
build_climate_cool_advanced_esp_idf5:
name: esp-idf v5 & Bluetooth proxy
runs-on: "ubuntu-latest"
needs:
- build_climate_cool_advanced_esp_idf
steps:
- uses: actions/checkout@v4.1.0
- name: Build core+advanced+climate_cool+esp_idf5
uses: esphome/build-action@v1.8.0
with:
yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf5.yaml"
version: beta
build_climate_heat_advanced_customization:
name: Customizations
runs-on: "ubuntu-latest"

View File

@@ -557,9 +557,9 @@ api:
// Chips icon size
ESP_LOGV(TAG, "Chips size");
for (int i = 1; i <= 10; ++i) {
disp1->send_command_printf("home.icon_top_%02d.font=%i", i, chip_font_size);
disp1->send_command_printf("home.icon_top_%02d.font=%" PRIu32, i, chip_font_size);
}
disp1->send_command_printf("home.wifi_icon.font=%i", chip_font_size);
disp1->send_command_printf("home.wifi_icon.font=%" PRIu32, chip_font_size);
id(home_chip_font_size) = chip_font_size;
// Notification button
@@ -572,13 +572,13 @@ api:
// QRCode button
ESP_LOGV(TAG, "Set QRCode button");
disp1->send_command_printf("is_qrcode=%i", (qrcode) ? 1 : 0);
disp1->send_command_printf("is_qrcode=%i", qrcode ? 1 : 0);
disp1->set_component_text_printf("home.bt_qrcode", "%s", qrcode_icon.c_str());
set_component_color->execute("home.bt_qrcode", qrcode_icon_color, {});
// Entities pages button
ESP_LOGV(TAG, "Set Entities button");
disp1->send_command_printf("is_entities=%i", (entities_pages) ? 1 : 0);
disp1->send_command_printf("is_entities=%i", entities_pages ? 1 : 0);
disp1->set_component_text_printf("home.bt_entities", "%s", entities_pages_icon.c_str());
//set_component_color->execute("home.bt_entities", entities_pages_icon_color, {});
set_component_color->execute("home.bt_entities", entities_pages_icon_color, {});
@@ -661,7 +661,7 @@ api:
//if (supported_features & 4096 and (state == "playing" or state == "paused")) disp1->show_component("bt_stop"); else disp1->hide_component("bt_stop");
// mute/unmute button - VOLUME_MUTE
disp1->set_component_value("is_muted", (is_volume_muted) ? 1 : 0);
disp1->set_component_value("is_muted", is_volume_muted ? 1 : 0);
if (supported_features & 8 and is_volume_muted) // unmute
{
disp1->set_component_text_printf("bt_mute", "%s", "\uEE07"); // mdi:volume-variant-off
@@ -725,10 +725,11 @@ display:
platform: nextion
uart_id: tf_uart
start_up_page: 8
on_page: # I couldn't make this trigger to work, so used text_sensor nspanelevent and localevent instead
on_page: # This requires `sendme` to be executed on Nextion side
lambda: |-
ESP_LOGW("display.disp1.on_page", "NEXTION PAGE CHANGED");
ESP_LOGW("display.disp1.on_page", "New page: %i", int(x));
static const char *const TAG = "display.disp1.on_page";
ESP_LOGD(TAG, "Nextion page changed");
ESP_LOGD(TAG, "New page: %i", int(x));
on_setup:
- script.execute: boot_sequence
@@ -841,7 +842,7 @@ globals:
restore_value: false
initial_value: ''
- id: home_relay1_icon_color
type: uint
type: uint16_t
restore_value: true
initial_value: '65535'
@@ -850,15 +851,15 @@ globals:
restore_value: false
initial_value: ''
- id: home_relay2_icon_color
type: uint
type: uint16_t
restore_value: true
initial_value: '65535'
- id: home_notify_icon_color_normal
type: std::vector<int>
type: std::vector<int32_t>
restore_value: false
- id: home_notify_icon_color_unread
type: std::vector<int>
type: std::vector<int32_t>
restore_value: false
##### Versions #####
@@ -871,6 +872,40 @@ globals:
restore_value: false
initial_value: ''
- id: page_names
type: std::vector<std::string>
restore_value: no
initial_value:
'{
"home",
"weather01",
"weather02",
"weather03",
"weather04",
"weather05",
"climate",
"settings",
"boot",
"screensaver",
"light",
"cover",
"buttonpage01",
"buttonpage02",
"buttonpage03",
"buttonpage04",
"notification",
"qrcode",
"entitypage01",
"entitypage02",
"entitypage03",
"entitypage04",
"fan",
"alarm",
"keyb_num",
"media_player",
"confirm"
}'
##### START - BINARY SENSOR CONFIGURATION #####
binary_sensor:
@@ -1442,7 +1477,7 @@ text_sensor:
if (page == "home" and component == "climate")
{
detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : "");
disp1->set_component_value("climate.embedded", (id(is_embedded_thermostat)) ? 1 : 0);
disp1->set_component_value("climate.embedded", id(is_embedded_thermostat) ? 1 : 0);
}
disp1->goto_page("climate");
}
@@ -1988,8 +2023,8 @@ script:
mode: queued
parameters:
component: string
foreground: int[]
background: int[]
foreground: int32_t[]
background: int32_t[]
then:
- lambda: |-
int fg565 = -1;
@@ -2615,7 +2650,7 @@ script:
# Reserved for Add-on Climate
- lambda: |-
ESP_LOGV("script.addon_climate_set_climate", "Check for addon_climate");
ESP_LOGV("script.addon_climate_set_climate", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
ESP_LOGV("script.addon_climate_set_climate", "embedded_climate: %s", embedded_climate ? "True" : "False");
- id: addon_climate_update_page_climate
mode: restart
then: