diff --git a/config/tv.yaml b/config/tv.yaml deleted file mode 100644 index 14672a4..0000000 --- a/config/tv.yaml +++ /dev/null @@ -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 \ No newline at end of file