Last active
January 2, 2024 12:13
-
-
Save haade-administrator/b65e5b346db054d736abe9657d13fd54 to your computer and use it in GitHub Desktop.
configuration téléinfo esphome avec homeassistant et Pitinfo plus wemos d1 heure de base
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
devicename: TELEINFO-PiTinfo | |
friendly_name: téléinformation home-assistant | |
device_description: remontée des infos compteur électrique avec PiTinfo | |
esphome: | |
name: $devicename | |
comment: ${device_description} | |
platform: ESP8266 | |
board: d1_mini | |
# Connection réseau wifi | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
# Activer le point d'accès de secours (portail captif) en cas d'échec de la connexion wifi | |
ap: | |
ssid: "${friendly_name} Fallback AP" | |
password: "!secret fallback_ap_password" | |
ota: | |
password: !secret ota_password | |
# Activer la journalisation | |
logger: | |
baud_rate: 0 | |
level: INFO | |
esp8266_store_log_strings_in_flash: False | |
captive_portal: | |
# Pour les abonnements au tarif HEURE BASE | |
uart: | |
id: uart_bus | |
rx_pin: GPIO3 # Pin Rx | |
baud_rate: 1200 | |
parity: EVEN | |
data_bits: 7 | |
binary_sensor: | |
- platform: status | |
name: "Teleinfo Status" | |
teleinfo: | |
update_interval: 30s | |
historical_mode: true | |
sensor: | |
- platform: wifi_signal | |
name: "WiFi Signal Sensor" | |
update_interval: 60s | |
unit_of_measurement: dB | |
accuracy_decimals: 0 | |
force_update: false | |
icon: mdi:wifi | |
- platform: uptime | |
id: uptime_seconds | |
name: "Uptime Sensor" | |
update_interval: 60s | |
unit_of_measurement: s | |
accuracy_decimals: 0 | |
force_update: false | |
icon: mdi:timer | |
- platform: teleinfo | |
tag_name: "ADCO" | |
name: "Adresse du compteur" | |
unit_of_measurement: "" | |
icon: mdi:eye | |
- platform: teleinfo | |
tag_name: "IMAX" | |
name: "Intensite max" | |
unit_of_measurement: "A" | |
icon: mdi:current-ac | |
- platform: teleinfo | |
tag_name: "ISOUSC" | |
name: "Intensite souscrite" | |
unit_of_measurement: "A" | |
icon: mdi:current-ac | |
- platform: teleinfo | |
tag_name: "IINST" | |
name: "Intensite" | |
unit_of_measurement: "A" | |
icon: mdi:current-ac | |
- platform: teleinfo | |
tag_name: "BASE" | |
name: "Index" | |
unit_of_measurement: "Wh" | |
icon: mdi:gauge | |
id: index_base | |
- platform: teleinfo | |
tag_name: "PAPP" | |
name: "Puissance" | |
unit_of_measurement: "VA" | |
icon: mdi:flash | |
- platform: teleinfo | |
tag_name: "EAIT" | |
name: "Energie active injectee totale" | |
unit_of_measurement: "Wh" | |
icon: mdi:gauge | |
text_sensor: | |
- platform: template | |
name: Uptime | |
update_interval: 60s | |
icon: mdi:clock-start | |
lambda: |- | |
int seconds = (id(uptime_seconds).state); | |
int days = seconds / (24 * 3600); | |
seconds = seconds % (24 * 3600); | |
int hours = seconds / 3600; | |
seconds = seconds % 3600; | |
int minutes = seconds / 60; | |
seconds = seconds % 60; | |
if ( days ) { | |
return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; | |
} else if ( hours ) { | |
return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; | |
} else if ( minutes ) { | |
return { (String(minutes) +"m "+ String(seconds) +"s").c_str() }; | |
} else { | |
return { (String(seconds) +"s").c_str() }; | |
} | |
- platform: teleinfo | |
tag_name: "OPTARIF" | |
name: "Type abonnement" | |
icon: mdi:handshake |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bonjour, il y a un conflit d'id avec la ligne 96, il faut remplacer index par index_base
Compiling .pioenvs/esp-d103f8/src/main.cpp.o
src/main.cpp:30:27: error: 'esphome::teleinfo::TeleInfoSensor* index' redeclared as different kind of symbol
teleinfo::TeleInfoSensor *index;
^