Handle unknown states
This commit is contained in:
@@ -206,13 +206,21 @@ script:
|
|||||||
ESP_LOGCONFIG("core_hw_buttons", "Button%s action%s:",
|
ESP_LOGCONFIG("core_hw_buttons", "Button%s action%s:",
|
||||||
id(gang_count_plural_suffix).c_str(),
|
id(gang_count_plural_suffix).c_str(),
|
||||||
id(gang_count_plural_suffix).c_str());
|
id(gang_count_plural_suffix).c_str());
|
||||||
ESP_LOGCONFIG("core_hw_buttons", " Relay 1: %s", sl_button_1_action->state.c_str());
|
ESP_LOGCONFIG("core_hw_buttons", " Relay 1: %s", sl_button_1_action->has_state()
|
||||||
|
? sl_button_1_action->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
if (id(gang_count) >= 2)
|
if (id(gang_count) >= 2)
|
||||||
ESP_LOGCONFIG("core_hw_buttons", " Relay 2: %s", sl_button_2_action->state.c_str());
|
ESP_LOGCONFIG("core_hw_buttons", " Relay 2: %s", sl_button_2_action->has_state()
|
||||||
|
? sl_button_2_action->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
if (id(gang_count) >= 3)
|
if (id(gang_count) >= 3)
|
||||||
ESP_LOGCONFIG("core_hw_buttons", " Relay 3: %s", sl_button_3_action->state.c_str());
|
ESP_LOGCONFIG("core_hw_buttons", " Relay 3: %s", sl_button_3_action->has_state()
|
||||||
|
? sl_button_3_action->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
if (id(gang_count) >= 4)
|
if (id(gang_count) >= 4)
|
||||||
ESP_LOGCONFIG("core_hw_buttons", " Relay 4: %s", sl_button_4_action->state.c_str());
|
ESP_LOGCONFIG("core_hw_buttons", " Relay 4: %s", sl_button_4_action->has_state()
|
||||||
|
? sl_button_4_action->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
|
|
||||||
- id: !extend touch_on_multi_touch_release
|
- id: !extend touch_on_multi_touch_release
|
||||||
then:
|
then:
|
||||||
|
|||||||
@@ -640,13 +640,21 @@ script:
|
|||||||
ESP_LOGCONFIG("core_hw_relays", "Relay%s mode%s:",
|
ESP_LOGCONFIG("core_hw_relays", "Relay%s mode%s:",
|
||||||
id(gang_count_plural_suffix).c_str(),
|
id(gang_count_plural_suffix).c_str(),
|
||||||
id(gang_count_plural_suffix).c_str());
|
id(gang_count_plural_suffix).c_str());
|
||||||
ESP_LOGCONFIG("core_hw_relays", " Relay 1: %s", sl_relay_1_mode->state.c_str());
|
ESP_LOGCONFIG("core_hw_relays", " Relay 1: %s", sl_relay_1_mode->has_state()
|
||||||
|
? sl_relay_1_mode->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
if (id(gang_count) >= 2)
|
if (id(gang_count) >= 2)
|
||||||
ESP_LOGCONFIG("core_hw_relays", " Relay 2: %s", sl_relay_2_mode->state.c_str());
|
ESP_LOGCONFIG("core_hw_relays", " Relay 2: %s", sl_relay_2_mode->has_state()
|
||||||
|
? sl_relay_2_mode->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
if (id(gang_count) >= 3)
|
if (id(gang_count) >= 3)
|
||||||
ESP_LOGCONFIG("core_hw_relays", " Relay 3: %s", sl_relay_3_mode->state.c_str());
|
ESP_LOGCONFIG("core_hw_relays", " Relay 3: %s", sl_relay_3_mode->has_state()
|
||||||
|
? sl_relay_3_mode->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
if (id(gang_count) >= 4)
|
if (id(gang_count) >= 4)
|
||||||
ESP_LOGCONFIG("core_hw_relays", " Relay 4: %s", sl_relay_4_mode->state.c_str());
|
ESP_LOGCONFIG("core_hw_relays", " Relay 4: %s", sl_relay_4_mode->has_state()
|
||||||
|
? sl_relay_4_mode->state.c_str()
|
||||||
|
: "Unknown");
|
||||||
ESP_LOGCONFIG("core_hw_relays", "Relay%s state%s:",
|
ESP_LOGCONFIG("core_hw_relays", "Relay%s state%s:",
|
||||||
id(gang_count_plural_suffix).c_str(),
|
id(gang_count_plural_suffix).c_str(),
|
||||||
id(gang_count_plural_suffix).c_str());
|
id(gang_count_plural_suffix).c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user