Hello, I’ve got problem with config - two entities are not corrected and I can’t find out why
Two entities are not created -> licznik_faza123_poweractive_kw and licznik_faza123_totalforwardactiveenergy until I’ll change name, only licznik_faza123_poweractive is always available.
- platform: template
sensors:
licznik_faza1_totalforwardactiveenergy:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[0].totalForwardActiveEnergy }}'
device_class: power
unit_of_measurement: 'kWh'
licznik_faza2_totalforwardactiveenergy:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[1].totalForwardActiveEnergy }}'
device_class: power
unit_of_measurement: 'kWh'
licznik_faza3_totalforwardactiveenergy:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[2].totalForwardActiveEnergy }}'
device_class: power
unit_of_measurement: 'kWh'
licznik_faza123_totalforwardactiveenergy:
value_template: >-
{{ (states.sensor.licznik_faza1_totalforwardactiveenergy.state | float)
+ (states.sensor.licznik_faza2_totalforwardactiveenergy.state | float)
+ (states.sensor.licznik_faza3_totalforwardactiveenergy.state | float) }}
unit_of_measurement: 'kWh'
device_class: power
icon_template: mdi:gauge
licznik_faza1_poweractive:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[0].powerActive }}'
device_class: power
unit_of_measurement: 'W'
licznik_faza2_poweractive:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[1].powerActive }}'
device_class: power
unit_of_measurement: 'W'
licznik_faza3_poweractive:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[2].powerActive }}'
device_class: power
unit_of_measurement: 'W'
licznik_faza123_poweractive:
value_template: >-
{{ (states.sensor.licznik_faza1_poweractive.state | float)
+ (states.sensor.licznik_faza2_poweractive.state | float)
+ (states.sensor.licznik_faza3_poweractive.state | float) }}
unit_of_measurement: 'W'
device_class: power
icon_template: mdi:gauge
licznik_faza123_poweractive_kw:
value_template: >-
{{ (((states.sensor.licznik_faza1_poweractive.state | float)
+ (states.sensor.licznik_faza2_poweractive.state | float)
+ (states.sensor.licznik_faza3_poweractive.state | float) )/1000 ) | round(2)}}
unit_of_measurement: 'kW'
device_class: power
icon_template: mdi:gauge
licznik_faza1_frequency:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[0].frequency }}'
device_class: power
unit_of_measurement: 'Hz'
licznik_faza2_frequency:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[1].frequency }}'
device_class: power
unit_of_measurement: 'Hz'
licznik_faza3_frequency:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[2].frequency }}'
device_class: power
unit_of_measurement: 'Hz'
licznik_faza1_current:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[0].current }}'
device_class: power
unit_of_measurement: 'A'
licznik_faza2_current:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[1].current }}'
device_class: power
unit_of_measurement: 'A'
licznik_faza3_current:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[2].current }}'
device_class: power
unit_of_measurement: 'A'
licznik_faza1_voltage:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[0].voltage }}'
device_class: power
unit_of_measurement: 'V'
licznik_faza2_voltage:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[1].voltage }}'
device_class: power
unit_of_measurement: 'V'
licznik_faza3_voltage:
value_template: '{{ states.sensor.nibe_f1226.attributes.phases[2].voltage }}'
device_class: power
unit_of_measurement: 'V'
licznik_mqtt_zuzycie_dzis:
unit_of_measurement: 'kW'
friendly_name: "Zużycie dziś licznik MQTT"
device_class: power
entity_id:
- sensor.licznik_koniec_dnia_stan
- sensor.licznik_faza123_totalforwardactiveenergy
value_template: >-
{% set koniec_dnia = states.sensor.licznik_koniec_dnia_stan.state|float %}
{% set aktualny = states.sensor.licznik_faza123_totalforwardactiveenergy.state| float %}
{{ (aktualny - koniec_dnia )|round(2) }}
licznik_mqtt_zuzycie_dzis_pln:
unit_of_measurement: 'PLN'
friendly_name: "Zużycie dziś licznik MQTT PLN"
value_template: >-
{{ ((states.sensor.nibe_f1226.attributes.pricePerUnit | float ) * ( states.sensor.licznik_mqtt_zuzycie_dzis.state |float )) | round(2) }}
licznik_mqtt_zuzycie_mc:
unit_of_measurement: 'kW'
friendly_name: "Zużycie mc licznik MQTT"
device_class: power
entity_id:
- sensor.licznik_koniec_mca_stan
- sensor.licznik_faza123_totalforwardactiveenergy
value_template: >-
{% set koniec_mca = states.sensor.licznik_koniec_mca_stan.state|float %}
{% set aktualny = states.sensor.licznik_faza123_totalforwardactiveenergy.state| float %}
{{ (aktualny - koniec_mca )|round(0) }}
licznik_mqtt_zuzycie_mc_pln:
unit_of_measurement: 'PLN'
friendly_name: "Zużycie mc licznik MQTT PLN"
value_template: >-
{{ ((states.sensor.nibe_f1226.attributes.pricePerUnit | float ) * ( states.sensor.licznik_mqtt_zuzycie_mc.state |float )) | round(2) }}
licznik_mqtt_zuzycie_rok:
unit_of_measurement: 'kW'
friendly_name: "Zużycie rok licznik MQTT"
device_class: power
entity_id:
- sensor.licznik_koniec_roku_stan
- sensor.licznik_faza123_totalforwardactiveenergy
value_template: >-
{% set koniec_roku = states.sensor.licznik_koniec_roku_stan.state|float %}
{% set aktualny = states.sensor.licznik_faza123_totalforwardactiveenergy.state| float %}
{{ (aktualny - koniec_roku )|round(0) }}
licznik_mqtt_zuzycie_rok_pln:
unit_of_measurement: 'PLN'
friendly_name: "Zużycie rok licznik MQTT PLN"
value_template: >-
{{ ((states.sensor.nibe_f1226.attributes.pricePerUnit | float ) * ( states.sensor.licznik_mqtt_zuzycie_rok.state |float )) | round(2) }}