A newbee question. How can ik solve this problem in home assistant.
I made 3 number booleans:
input_number.gas_jaarplanning
input_number.gas_nu
input_number.var_gas_beginstand
gas_jaarplanning=value:2000
gas_beginstand=value:1000
gas_nu=value:1500 (sensor:sensor.gas_consumed)
In templates.yaml I put the following:
- trigger:
- platform: time_pattern
minutes: "/1"
name: “Gas”
unit_of_measurement: m3
state: >
{{state('input_number.gas_nu')=state(‘input_number.gas_jaarplanning’)-state(input_number.var_gas_beginstand)}}
Valid configuration gives:
Error loading /config/configuration.yaml: while parsing a block mapping in “/config/templates.yaml”, line 1, column 3 expected , but found ‘’ in “/config/templates.yaml”, line 14, column 4
line14= name: “Gas”
Peter