Hi all and thanks for sharing Stiebel tips and information. I’m trying to connect my Stiebel Eltron WPF 10 heat pump can bus with Wemos D1 mini pro and MCP2515 can board. Basically configuration is based on the instructions given here: CAN bus — ESPHome
With the below pasted .yaml I do get some data, like heating and boiler temperatures and after a while also one of the COPs is shown. But most of the measurements stays in N/A state. Any ideas what could be wrong in my configuration?
I also noted that when my ESP is connected to the can bus of the pump, the pump’s menus comes quite slow. Sometimes it even shown an empty submenu / no measurements at all. But going one step back in the menu and retrying usually helps and the measurements are again correctly shown. It looks like my ESP is somehow messing out the can bus…?
PS. like you see, my code is almost like copy-paste from this site posts
esphome:
name: heatpump
platform: ESP8266
board: d1_mini_pro
# Enable logging
logger:
# Enable Home Assistant API
api:
# password: "<password>"
services:
- service: pull_canmsg
variables:
idx: int
addr: int
val: int
then:
- lambda: |-
int getA = static_cast<int>(addr); //Adresse in Byte 0 u. 1 schreiben
id(sh_state)[0]=getA>>8;
id(sh_state)[1]=getA-((getA>>8)<<8);
getA = static_cast<int>(idx); //Elster-Index übernehmen // Ota käyttöön Elster-indeksi
//Wenn Elster-Index <= 0xff => an Byte-Stelle 2 schreiben //Jos Elster-indeksi <= 0xff => kirjoita tavupaikkaan 2
if( (getA>>8) == 0x00) {
id(sh_state)[2]=getA-((getA>>8)<<8);
getA = static_cast<int>(val); //Datenwert übernehmen und an Stelle 3 u. 4 schreiben, 5 u. 6 ist 0x00 // Ota tietoarvo ja kirjoita paikkoihin 3 ja 4, 5 ja 6 on 0x00
id(sh_state)[3]=getA>>8;
id(sh_state)[4]=getA-((getA>>8)<<8);
id(sh_state)[5]=0x00;
id(sh_state)[6]=0x00;
}
else {
//Wenn Elster-Index > 0xff kommt 0xfa an Stelle 2, der Index steht dann an Stelle 3 u. 4 //Jos Elster-indeksi > 0xff, 0xfa tulee paikalleen 2, indeksi on silloin paikoissa 3 ja 4
id(sh_state)[2]=0xfa;
id(sh_state)[3]=getA>>8;
id(sh_state)[4]=getA-((getA>>8)<<8);
getA = static_cast<int>(val); //der Datenwert steht dann an Stelle 5 u. 6 //tietoarvo on silloin paikoissa 5 ja 6
id(sh_state)[5]=getA>>8;
id(sh_state)[6]=getA-((getA>>8)<<8);
}
#Temporaly removed when debuging wifi problem..
# ota:
# password: !secret ota_password
# safe_mode: true
# reboot_timeout: 10min
# num_attempts: 5
wifi:
fast_connect: true
ssid: !secret wifi_ssid
password: !secret wifi_password
#Temporaly removed when debuging wifi problem..
# Enable fallback hotspot (captive portal) in case wifi connection fails
# ap:
# ssid: heatpump
#Temporaly removed when debuging wifi problem..
#captive_portal:
web_server:
port: 80
auth:
username: !secret web_uname
password: !secret web_pw
#Joku bugi, ilman debugia wifiin yhditäminen failaa
#Bug? WiFi connection fails without debug..
debug:
globals:
#Array zum Senden von Can-Bus Befehl aus Home-Assistant
#Matriisi Can-Bus-komennon lähettämiseen Home Assistantista
- id: sh_state
type: int[7]
initial_value: '{0x00,0x00,0x00,0x00,0x00,0x00,0x00}'
restore_value: no
#Array zum Senden von Can-Bus Befehl aus Programmcode
#Matriisi Can-Bus-komennon lähettämiseen ohjelmakoodista
- id: send_state
type: int[7]
initial_value: '{0x00,0x00,0x00,0x00,0x00,0x00,0x00}'
restore_value: no
- id: el_aufnahmeleistung_ww_tag_wh_float
type: float
restore_value: no
- id: el_aufnahmeleistung_ww_tag_wh_flag
type: bool
restore_value: no
- id: el_aufnahmeleistung_ww_tag_kwh
type: float
restore_value: no
- id: el_aufnahmeleistung_ww_tag_kwh_flag
type: bool
restore_value: no
- id: el_aufnahmeleistung_heiz_tag_wh_float
type: float
restore_value: no
- id: el_aufnahmeleistung_heiz_tag_wh_flag
type: bool
restore_value: no
- id: el_aufnahmeleistung_heiz_tag_kwh
type: float
restore_value: no
- id: el_aufnahmeleistung_heiz_tag_kwh_flag
type: bool
restore_value: no
- id: el_aufnahmeleistung_ww_total_kWh_float
type: float
restore_value: no
- id: el_aufnahmeleistung_ww_total_kWh_flag
type: bool
restore_value: no
- id: el_aufnahmeleistung_ww_total_mWh
type: float
restore_value: no
- id: el_aufnahmeleistung_ww_total_mWh_flag
type: bool
restore_value: no
- id: el_aufnahmeleistung_heiz_total_kWh_float
type: float
restore_value: no
- id: el_aufnahmeleistung_heiz_total_kWh_flag
type: bool
restore_value: no
- id: el_aufnahmeleistung_heiz_total_mWh
type: float
restore_value: no
- id: volumenstrom_float
type: float
restore_value: no
- id: el_aufnahmeleistung_heiz_total_mWh_flag
type: bool
restore_value: no
- id: VD_starts_h
type: int
initial_value: '0'
restore_value: no
- id: VD_starts_t
initial_value: '0'
type: float
restore_value: no
- id: waermemertrag_ww_tag_wh_float
type: float
restore_value: no
- id: waermemertrag_ww_tag_wh_flag
type: bool
restore_value: no
- id: waermemertrag_ww_tag_kwh
type: float
restore_value: no
- id: waermemertrag_ww_tag_kwh_flag
type: bool
- id: waermemertrag_electr_ww_tag_wh_float
type: float
restore_value: no
- id: waermemertrag_electr_ww_tag_wh_flag
type: bool
restore_value: no
- id: waermemertrag_electr_ww_tag_kwh
type: float
restore_value: no
- id: waermemertrag_electr_ww_tag_kwh_flag
type: bool
restore_value: no
- id: waermemertrag_heiz_tag_wh_float
type: float
restore_value: no
- id: waermemertrag_heiz_tag_wh_flag
type: bool
restore_value: no
- id: waermemertrag_heiz_tag_kwh
type: float
restore_value: no
- id: waermemertrag_heiz_tag_kwh_flag
type: bool
restore_value: no
- id: waermemertrag_electr_heiz_tag_wh_float
type: float
restore_value: no
- id: waermemertrag_electr_heiz_tag_wh_flag
type: bool
restore_value: no
- id: waermemertrag_electr_heiz_tag_kwh
type: float
restore_value: no
- id: waermemertrag_electr_heiz_tag_kwh_flag
type: bool
restore_value: no
- id: waermemertrag_ww_total_kWh_float
type: float
restore_value: no
- id: waermemertrag_ww_total_kWh_flag
type: bool
restore_value: no
- id: waermemertrag_ww_total_mWh
type: float
restore_value: no
- id: waermemertrag_ww_total_mWh_flag
type: bool
restore_value: no
- id: waermemertrag_heiz_total_kWh_float
type: float
restore_value: no
- id: waermemertrag_heiz_total_kWh_flag
type: bool
restore_value: no
- id: waermemertrag_heiz_total_mWh
type: float
restore_value: no
- id: waermemertrag_heiz_total_mWh_flag
type: bool
restore_value: no
- id: waermemertrag_electr_heiz_total_kWh_float
type: float
restore_value: no
- id: waermemertrag_electr_heiz_total_kWh_flag
type: bool
restore_value: no
- id: waermemertrag_electr_heiz_total_mWh
type: float
restore_value: no
- id: waermemertrag_electr_heiz_total_mWh_flag
type: bool
restore_value: no
- id: waermemertrag_electr_ww_total_kWh_float
type: float
restore_value: no
- id: waermemertrag_electr_ww_total_kWh_flag
type: bool
restore_value: no
- id: waermemertrag_electr_ww_total_mWh
type: float
restore_value: no
- id: waermemertrag_electr_ww_total_mWh_flag
type: bool
restore_value: no
#Abfrage des Sensorstatus durch Ausführen des Lambda-Befehls. send_state wird auf das request-Paket gesetzt. Anschließend wird Update_sensor aktiviert, der den Befehl via CAN absetzt und wieder deaktiviert
#Anturin tilan kyseleminen suorittamalla Lambda-komento. send_state on asetettu pyyntöpakettiin. Sitten Update_sensor aktivoituu, joka lähettää komennon CAN:n kautta ja deaktivoi sen uudelleen
sensor:
- platform: template
#name: "Außentemperatur"
name: "Ulkolämpötila"
id: temperature_outside
unit_of_measurement: "°C"
icon: "mdi:thermometer-lines"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x00;id(send_state)[4]=0x0c;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 10min
- platform: template
#name: "Quellentemperatur"
name: "Lähteen lämpötila"
id: temperature_source
unit_of_measurement: "°C"
icon: "mdi:thermometer-lines"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x01;id(send_state)[4]=0xd4;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 10min
- platform: template
#name: "Warmwassertemperatur"
name: "Lämpimän veden lämpötila"
id: temperature_water
unit_of_measurement: "°C"
icon: "mdi:thermometer-lines"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0x0e;id(send_state)[3]=0x01;id(send_state)[4]=0x00;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 10min
#In Planung
# - platform: template
# name: "WW_Programmstart"
# id: ww_start
# icon: "mdi:timer-play"
# state_class: "measurement"
# accuracy_decimals: 0
#In Planung
# - platform: template
# name: "WW_Programmende"
# id: ww_ende
# icon: "mdi:timer-stop"
# state_class: "measurement"
# accuracy_decimals: 0
#Berechnung COP erfolgt über Sensoren für Stromverbrauch und Wärmeproduktion - kein aktiver Update-Befehl
##COP:n laskenta tapahtuu sähkönkulutuksen ja lämmöntuotannon antureiden kautta - ei aktiivista päivityskomentoa
- platform: template
#name: "Verdichterstarts"
name: "Kompressori käynnistyy"
id: VD_starts
unit_of_measurement: "a.u."
icon: "mdi:chart-bell-curve-cumulative"
device_class: "power_factor"
state_class: "measurement"
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x07;id(send_state)[4]=0x1c;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x07;id(send_state)[4]=0x1d;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
if (id(VD_starts_t>0) and id(VD_starts_h>0)){
float VD_starts_float = id(VD_starts_h)+id(VD_starts_t);
return VD_starts_float;
}
else {return {};}
update_interval: 5h
accuracy_decimals: 0
- platform: template
#name: "COP-Wert Heizung"
name: "COP-arvo lämmitys"
id: cop_heater
unit_of_measurement: "a.u."
icon: "mdi:chart-bell-curve-cumulative"
device_class: "power_factor"
state_class: "measurement"
accuracy_decimals: 2
lambda: |-
id(total_electric_energy_heating).update();
id(total_heating_energy).update();
id(total_electric_heating_energy).update();
float heat_cop_float = (id(waermemertrag_heiz_total_mWh)+id(waermemertrag_electr_heiz_total_mWh))/id(el_aufnahmeleistung_heiz_total_mWh);
return heat_cop_float;
force_update: true
- platform: template
#name: "COP-Wert Warmwasser"
name: "COP-arvo lämmin vesi"
id: cop_water
unit_of_measurement: "a.u."
icon: "mdi:chart-bell-curve-cumulative"
device_class: "power_factor"
state_class: "measurement"
accuracy_decimals: 2
lambda: |-
id(total_heating_energy_water).update();
id(total_electric_energy_water).update();
id(total_heating_energy_water).update();
float ww_cop_float = (id(waermemertrag_ww_total_mWh)+id(waermemertrag_electr_ww_total_mWh))/id(el_aufnahmeleistung_ww_total_mWh);
return ww_cop_float;
force_update: true
- platform: template
#name: "COP-Wert Gesamt"
name: "COP-arvo yhteensä"
id: cop_total
unit_of_measurement: "a.u."
icon: "mdi:chart-bell-curve-cumulative"
device_class: "power_factor"
state_class: "measurement"
accuracy_decimals: 2
lambda: |-
id(cop_water).update();
id(cop_heater).update();
float total_cop_float = ((id(waermemertrag_heiz_total_mWh)+id(waermemertrag_electr_heiz_total_mWh))+(id(waermemertrag_ww_total_mWh)+id(waermemertrag_electr_ww_total_mWh)))/(id(el_aufnahmeleistung_heiz_total_mWh)+id(el_aufnahmeleistung_ww_total_mWh));
return total_cop_float;
force_update: true
update_interval: 6h
- platform: template
#name: "Rücklauftemperatur Heizung"
name: "Lämmityksen paluulämpötila"
id: temperature_return
unit_of_measurement: "°C"
icon: "mdi:waves-arrow-left"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x00;id(send_state)[4]=0x16;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 5min
- platform: template
#name: "T Heizkreis IST"
name: "T lämmityspiiri TODELLINEN"
id: t_heizkreis_ist
unit_of_measurement: "°C"
icon: "mdi:waves-arrow-right"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x02;id(send_state)[4]=0xca;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 5min
- platform: template
#name: "T Heizkreis Soll"
name: "T lämmityspiiri TAVOITE"
id: t_heizkreis_soll
unit_of_measurement: "°C"
icon: "mdi:waves-arrow-left"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x01;id(send_state)[4]=0xd7;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 15min
- platform: template
#name: "Speicher Soll Temperatur"
name: "T varaajan TAVOITE"
id: t_ww_soll
unit_of_measurement: "°C"
icon: "mdi:thermometer-water"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0x03;id(send_state)[3]=0x00;id(send_state)[4]=0x00;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 15min
- platform: template
#name: "Speicher IST Temperatur"
name: "T varaaja TODELLINEN"
id: t_ww_ist
unit_of_measurement: "°C"
icon: "mdi:thermometer-lines"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
- platform: template
#name: "Eco Speicher Soll Temperatur"
name: "T Eco varaajan TAVOITE"
id: ww_temp_eco_log
unit_of_measurement: "°C"
icon: "mdi:thermometer-low"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x0a;id(send_state)[4]=0x06;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 10min
- platform: template
#name: "Komfort Speicher Soll Temperatur"
name: "T Mukavuus varaaja TAVOITE"
id: ww_temp_komfort_log
unit_of_measurement: "°C"
icon: "mdi:thermometer-high"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0x13;id(send_state)[3]=0x00;id(send_state)[4]=0x00;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 10min
- platform: template
#name: "Volumenstrom"
name: "Virtausnopeus"
id: volumenstrom_log
unit_of_measurement: "l/min"
icon: "mdi:waves-arrow-right"
state_class: "measurement"
accuracy_decimals: 2
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x06;id(send_state)[4]=0x73;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 1min
- platform: template
#name: "Heizungsdruck"
name: "Lämmityspaine"
id: heizungsdruck_log
unit_of_measurement: "bar"
icon: "mdi:gauge"
device_class: "pressure"
state_class: "measurement"
accuracy_decimals: 2
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x06;id(send_state)[4]=0x74;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
return {};
update_interval: 7min
- platform: template
#name: "Puffertemperatur"
name: "Puskurivaraajan lämpötila"
id: puffertemperatur_log
unit_of_measurement: "°C"
icon: "mdi:thermometer-high"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
#Automatische Updates durch FEK
- platform: template
#name: "Luftfeuchtigkeit Wohnraum"
name: "Asunnon kosteus"
id: humidity_inside
unit_of_measurement: "%rH"
icon: "mdi:water-percent"
device_class: "humidity"
state_class: "measurement"
accuracy_decimals: 1
- platform: template
#name: "Temperatur Wohnraum"
name: "Asunnon lämpötila"
id: temperature_inside
unit_of_measurement: "°C"
icon: "mdi:thermometer-lines"
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
- platform: template
#name: "Stromverbrauch Warmwasser heute"
name: "Sähkönkulutus lämminvesi tänään"
id: daily_electric_energy_water
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "measurement"
accuracy_decimals: 3
icon: "mdi:transmission-tower"
lambda: |-
//el. Leistungsaufnahme WW Tag Wh
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x1a;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
//el. Leistungsaufnahme WW Tag kWh
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x1b;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
if (id(el_aufnahmeleistung_ww_tag_kwh_flag) and id(el_aufnahmeleistung_ww_tag_wh_flag)){
id(el_aufnahmeleistung_ww_tag_kwh) += id(el_aufnahmeleistung_ww_tag_wh_float);
float daily_electric_energy_water=id(el_aufnahmeleistung_ww_tag_kwh);
id(el_aufnahmeleistung_ww_tag_kwh_flag)=false;
id(el_aufnahmeleistung_ww_tag_wh_flag)=false;
return daily_electric_energy_water;
}
else{return {};}
update_interval: 15min
- platform: template
#name: "WM Heizung heute"
name: "Lämmityksen WM?? tänään"
id: daily_heating_energy
unit_of_measurement: "kWh"
device_class: "energy"
icon: "mdi:water-boiler"
state_class: "measurement"
accuracy_decimals: 3
lambda: |-
//WM Heizen Tag wh
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x2e;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
//WM Heizen Tag kwh
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x2f;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
if (id(waermemertrag_heiz_tag_kwh_flag) and id(waermemertrag_heiz_tag_wh_flag)){
id(waermemertrag_heiz_tag_kwh) += id(waermemertrag_heiz_tag_wh_float);
float daily_heating_energy=id(waermemertrag_heiz_tag_kwh);
id(waermemertrag_heiz_tag_kwh_flag)=false;
id(waermemertrag_heiz_tag_wh_flag)=false;
return daily_heating_energy;
}
else {
return {};
}
update_interval: 15min
- platform: template
#name: "Stromverbrauch Heizung heute"
name: "Sähkönkulutus lämmitys tänään"
id: daily_electric_energy_heating
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "measurement"
icon: "mdi:transmission-tower"
accuracy_decimals: 3
lambda: |-
//el. Leistungsaufnahme Heizen Tag Wh
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x1e;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
//el. Leistungsaufnahme Heizen Tag kWh
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x1f;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
if (id(el_aufnahmeleistung_heiz_tag_kwh_flag) and id(el_aufnahmeleistung_heiz_tag_wh_flag)){
id(el_aufnahmeleistung_heiz_tag_kwh) += id(el_aufnahmeleistung_heiz_tag_wh_float);
float daily_electric_energy_heating=id(el_aufnahmeleistung_heiz_tag_kwh);
id(el_aufnahmeleistung_heiz_tag_kwh_flag)=false;
id(el_aufnahmeleistung_heiz_tag_wh_flag)=false;
return daily_electric_energy_heating;
}
else{return {};}
update_interval: 6h
- platform: template
#name: "WM Warmwasser heute"
name: "Lämpimän veden WM?? tänään"
id: daily_heating_energy_water
unit_of_measurement: "kWh"
device_class: "energy"
icon: "mdi:water-boiler"
state_class: "measurement"
accuracy_decimals: 3
lambda: |-
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x2a;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
id(send_state)[0]=0x31;id(send_state)[1]=0x00;id(send_state)[2]=0xfa;id(send_state)[3]=0x09;id(send_state)[4]=0x2b;id(send_state)[5]=0x00;id(send_state)[6]=0x00;
id(update_sensor).publish_state(true);
id(update_sensor).publish_state(false);
if (id(waermemertrag_ww_tag_kwh_flag) and id(waermemertrag_ww_tag_wh_flag)){
id(waermemertrag_ww_tag_kwh) += id(waermemertrag_ww_tag_wh_float);
float daily_heating_energy_water=id(waermemertrag_ww_tag_kwh);
id(waermemertrag_ww_tag_kwh_flag)=false;
id(waermemertrag_ww_tag_wh_flag)=false;
return daily_heating_energy_water;
}
else{ return {};
}
update_interval: 15min