Can someone help me and explain what I forgot.
…
UndefinedError: ‘input_number’ is undefined
…
template:
- sensor:
- name: "Gas Verbrauch Buderus"
unique_id: "gas_verbrauch_buderus"
device_class: "gas"
state_class: "total_increasing"
unit_of_measurement: "m³"
state: >
{% set kwh = states('sensor.recording_ractualpower') | float %}
{% set normdichte_value = input_number.gas_normdichte | float %}
{% set mengengewichtet_value = input_number.gas_mengengewichtet | float %}
{{ ( kwh/(normdichte_value * mengengewichtet_value) ) | round(1) }}
Picture shown my Input_number
If I put static value it works…
template:
- sensor:
- name: "Gas Verbrauch Buderus"
unique_id: "gas_verbrauch_buderus"
device_class: "gas"
state_class: "total_increasing"
unit_of_measurement: "m³"
state: >
{% set kwh = states('sensor.recording_ractualpower') | float %} # kWh Sensor setzen
{% set normdichte_value = 0.80314 | float %} # normdichte setzen
{% set mengengewichtet_value = 11.5593 | float %} # mengengewichtet setzen
{{ ( kwh/(normdichte_value * mengengewichtet_value) ) | round(1) }} # (kwh / (Normdichte * mengengewichtet)) gerundet auf 0,1