From 47a53dcc60385ccb12696f92fd4d9bd6faebb4c8 Mon Sep 17 00:00:00 2001 From: Raymond Bourges Date: Wed, 28 May 2025 18:03:52 +0200 Subject: [PATCH] REFACTO : Optimisation temps de start --- config/tv2.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/config/tv2.yaml b/config/tv2.yaml index 5270dfb..76ea036 100644 --- a/config/tv2.yaml +++ b/config/tv2.yaml @@ -1,11 +1,17 @@ esphome: name: tv2 friendly_name: tv2 - on_boot: - then: + on_boot: + - then: + - delay: 1s - output.turn_off: relais + - lambda: 'ESP_LOGD("main", "----- boot -----> Relais OFF !");' - output.turn_on: bouton_vert - output.turn_off: bouton_rouge + - delay: 1s + - output.turn_on: relais + - lambda: 'ESP_LOGD("main", "----- boot -----> Relais ON !");' + - output.turn_on: bouton_rouge esp32: board: esp32-c6-devkitc-1 @@ -63,7 +69,8 @@ sensor: if (id(from_start_count) < 10) { id(from_start_count)++; id(bouton_rouge).turn_on(); - id(relais).turn_on(); + id(relais).turn_on(); + ESP_LOGD("main", "--> Relais ON !"); ESP_LOGD("main", "--> Démarrage... (%d / 10)", id(from_start_count)); } else { if (id(puissance_faible)) { @@ -73,6 +80,7 @@ sensor: if (id(low_power_count) >= 5) { ESP_LOGD("main", "--> TV OFF !"); id(relais).turn_off(); + ESP_LOGD("main", "--> Relais OFF !"); } } on_value_range: @@ -89,7 +97,6 @@ sensor: id(puissance_faible) = false; id(bouton_vert).turn_on(); id(relais).turn_on(); - id(low_power_count) = 0; - + ESP_LOGD("main", "--> Relais ON !"); + id(low_power_count) = 0; update_interval: 5s - \ No newline at end of file