REFACTO : suppr vieux code TV
This commit is contained in:
parent
4c9f33fc88
commit
b33565876c
@ -1,70 +0,0 @@
|
||||
esphome:
|
||||
name: tv
|
||||
friendly_name: TV
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "wbYIRZHpZb8Q8urkl1PqMfP54rY8TUca3VBJxx5DcmI="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: "dbba6251c020b7547d3703b1fc8b5d9d"
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
uart:
|
||||
tx_pin: GPIO44 # Il faut les inverser !!!!
|
||||
rx_pin: GPIO43
|
||||
baud_rate: 9600
|
||||
# debug:
|
||||
# direction: BOTH
|
||||
# dummy_receiver: false
|
||||
# after:
|
||||
# delimiter: "\n"
|
||||
# sequence:
|
||||
# - lambda: UARTDebug::log_string(direction, bytes);
|
||||
|
||||
modbus:
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO8
|
||||
id: gpio_8
|
||||
|
||||
sensor:
|
||||
- platform: pzemac
|
||||
address: 4
|
||||
power:
|
||||
name: "PZEM-004T V3 Power"
|
||||
on_value_range:
|
||||
- above: 2
|
||||
then:
|
||||
- lambda: |-
|
||||
// Convertir la valeur flottante en string
|
||||
char buffer[30]; // Taille suffisante pour stocker la chaîne
|
||||
snprintf(buffer, sizeof(buffer), "%.2f", x);
|
||||
ESP_LOGD("main", "--> Lampe ON (%s W)", buffer);
|
||||
id(gpio_8).turn_on();
|
||||
- below: 2
|
||||
then:
|
||||
- wait_until:
|
||||
condition:
|
||||
lambda: 'return millis() >= 60000;'
|
||||
- lambda: |-
|
||||
// Convertir la valeur flottante en string
|
||||
char buffer[30]; // Taille suffisante pour stocker la chaîne
|
||||
snprintf(buffer, sizeof(buffer), "%.2f", x);
|
||||
ESP_LOGD("main", "--> Lampe OFF (%s W)", buffer);
|
||||
id(gpio_8).turn_off();
|
||||
update_interval: 5s
|
||||
Loading…
Reference in New Issue
Block a user