Use on_value on select
This commit is contained in:
@@ -515,7 +515,7 @@ select:
|
||||
entity_category: config
|
||||
disabled_by_default: true
|
||||
icon: mdi:file-sync
|
||||
set_action:
|
||||
on_value:
|
||||
- script.execute: set_tft_file
|
||||
|
||||
- id: tft_file_model
|
||||
@@ -537,7 +537,7 @@ select:
|
||||
entity_category: config
|
||||
disabled_by_default: false
|
||||
icon: mdi:file-sync
|
||||
set_action:
|
||||
on_value:
|
||||
- script.execute: set_tft_file
|
||||
|
||||
sensor:
|
||||
|
||||
@@ -1297,7 +1297,7 @@ select:
|
||||
entity_category: config
|
||||
disabled_by_default: true
|
||||
icon: mdi:swap-horizontal
|
||||
set_action:
|
||||
on_value:
|
||||
- lambda: set_baud_rate->execute(stoi(x), true);
|
||||
|
||||
- id: wakeup_page_name
|
||||
@@ -1321,7 +1321,7 @@ select:
|
||||
internal: false
|
||||
entity_category: config
|
||||
icon: mdi:page-next-outline
|
||||
set_action:
|
||||
on_value:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "select.wakeup_page_name";
|
||||
ESP_LOGD(TAG, "New wake-up page selected: %s", x.c_str());
|
||||
@@ -2515,8 +2515,7 @@ script:
|
||||
mode: restart
|
||||
then:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "script.restore_settings";
|
||||
ESP_LOGD(TAG, "Restoring settings");
|
||||
ESP_LOGD("script.restore_settings", "Restoring settings");
|
||||
|
||||
#ifdef ARDUINO
|
||||
id(framework) = 1;
|
||||
@@ -2524,16 +2523,19 @@ script:
|
||||
id(framework) = 2;
|
||||
#endif
|
||||
|
||||
ESP_LOGV(TAG, "Restoring baud rate");
|
||||
set_baud_rate->execute(stoi(baud_rate->state), true);
|
||||
|
||||
// ESP_LOGV(TAG, "Restoring wake-up page selector");
|
||||
// auto wakeup_page_name_call = id(wakeup_page_name).make_call();
|
||||
// wakeup_page_name_call.set_option(id(page_names)[id(wakeup_page_id)]);
|
||||
// wakeup_page_name_call.perform();
|
||||
|
||||
// id(is_restored_settings) = true;
|
||||
ESP_LOGV(TAG, "Finishing");
|
||||
- wait_until:
|
||||
condition:
|
||||
- lambda: return (not isnan(stoi(baud_rate->state)));
|
||||
- lambda: |-
|
||||
ESP_LOGV("script.restore_settings", "Restoring baud rate");
|
||||
set_baud_rate->execute(stoi(baud_rate->state), true);
|
||||
ESP_LOGV("script.restore_settings", "Done!");
|
||||
|
||||
- id: service_call_alarm_control_panel
|
||||
mode: restart
|
||||
|
||||
Reference in New Issue
Block a user