From dc9931939792a5868f732b04d64fd79e9f97c0fc Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:46:06 +0100 Subject: [PATCH] Fix relay id on log --- ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml b/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml index 0cf8b30..a044bb5 100644 --- a/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml +++ b/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml @@ -795,12 +795,12 @@ script: case 1: if (light_index >= id(gb_lights_1).size()) { ESP_LOGE("core_hw_leds", "Invalid set with %s light for Relay %" PRIu8, - light_mode_group_1.c_str(), light_index); + light_mode_group_1.c_str(), light_index+1); return; } if (state and !id(gb_lights_1)[light_index]->current_values.is_on()) { ESP_LOGI("core_hw_leds", "Turn-on %s light for Relay %" PRIu8, - light_mode_group_1.c_str(), light_index); + light_mode_group_1.c_str(), light_index+1); auto call = id(gb_lights_1)[light_index]->turn_on(); if (LIGHT_TRANSITION_TURN_ON > 0) call.set_transition_length(LIGHT_TRANSITION_TURN_ON); // in ms @@ -809,7 +809,7 @@ script: call.perform(); } else if (!state and id(gb_lights_1)[light_index]->current_values.is_on()) { ESP_LOGI("core_hw_leds", "Turn-off %s light for Relay %" PRIu8, - light_mode_group_1.c_str(), light_index); + light_mode_group_1.c_str(), light_index+1); auto call = id(gb_lights_1)[light_index]->turn_off(); if (LIGHT_TRANSITION_TURN_OFF > 0) call.set_transition_length(LIGHT_TRANSITION_TURN_OFF); // in ms @@ -819,12 +819,12 @@ script: case 2: if (light_index >= id(gb_lights_2).size()) { ESP_LOGE("core_hw_leds", "Invalid set with %s light for Relay %" PRIu8, - light_mode_group_2.c_str(), light_index); + light_mode_group_2.c_str(), light_index+1); return; } if (state and !id(gb_lights_2)[light_index]->current_values.is_on()) { ESP_LOGI("core_hw_leds", "Turn-on %s light for Relay %" PRIu8, - light_mode_group_2.c_str(), light_index); + light_mode_group_2.c_str(), light_index+1); auto call = id(gb_lights_2)[light_index]->turn_on(); if (LIGHT_TRANSITION_TURN_ON > 0) call.set_transition_length(LIGHT_TRANSITION_TURN_ON); // in ms @@ -833,7 +833,7 @@ script: call.perform(); } else if (!state and id(gb_lights_2)[light_index]->current_values.is_on()) { ESP_LOGI("core_hw_leds", "Turn-off %s light for Relay %" PRIu8, - light_mode_group_2.c_str(), light_index); + light_mode_group_2.c_str(), light_index+1); auto call = id(gb_lights_2)[light_index]->turn_off(); if (LIGHT_TRANSITION_TURN_OFF > 0) call.set_transition_length(LIGHT_TRANSITION_TURN_OFF); // in ms