REFACTO : Optimisation temps de start
This commit is contained in:
parent
1b3464f06e
commit
47a53dcc60
@ -2,10 +2,16 @@ esphome:
|
|||||||
name: tv2
|
name: tv2
|
||||||
friendly_name: tv2
|
friendly_name: tv2
|
||||||
on_boot:
|
on_boot:
|
||||||
then:
|
- then:
|
||||||
|
- delay: 1s
|
||||||
- output.turn_off: relais
|
- output.turn_off: relais
|
||||||
|
- lambda: 'ESP_LOGD("main", "----- boot -----> Relais OFF !");'
|
||||||
- output.turn_on: bouton_vert
|
- output.turn_on: bouton_vert
|
||||||
- output.turn_off: bouton_rouge
|
- output.turn_off: bouton_rouge
|
||||||
|
- delay: 1s
|
||||||
|
- output.turn_on: relais
|
||||||
|
- lambda: 'ESP_LOGD("main", "----- boot -----> Relais ON !");'
|
||||||
|
- output.turn_on: bouton_rouge
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: esp32-c6-devkitc-1
|
board: esp32-c6-devkitc-1
|
||||||
@ -64,6 +70,7 @@ sensor:
|
|||||||
id(from_start_count)++;
|
id(from_start_count)++;
|
||||||
id(bouton_rouge).turn_on();
|
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));
|
ESP_LOGD("main", "--> Démarrage... (%d / 10)", id(from_start_count));
|
||||||
} else {
|
} else {
|
||||||
if (id(puissance_faible)) {
|
if (id(puissance_faible)) {
|
||||||
@ -73,6 +80,7 @@ sensor:
|
|||||||
if (id(low_power_count) >= 5) {
|
if (id(low_power_count) >= 5) {
|
||||||
ESP_LOGD("main", "--> TV OFF !");
|
ESP_LOGD("main", "--> TV OFF !");
|
||||||
id(relais).turn_off();
|
id(relais).turn_off();
|
||||||
|
ESP_LOGD("main", "--> Relais OFF !");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
on_value_range:
|
on_value_range:
|
||||||
@ -89,7 +97,6 @@ sensor:
|
|||||||
id(puissance_faible) = false;
|
id(puissance_faible) = false;
|
||||||
id(bouton_vert).turn_on();
|
id(bouton_vert).turn_on();
|
||||||
id(relais).turn_on();
|
id(relais).turn_on();
|
||||||
|
ESP_LOGD("main", "--> Relais ON !");
|
||||||
id(low_power_count) = 0;
|
id(low_power_count) = 0;
|
||||||
|
|
||||||
update_interval: 5s
|
update_interval: 5s
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user