Hi there,
I’m struggeling with some automation code and do not know how to fix it. Can anyone of you give me a quick hint?
I was creating an automation with a code part and got message, that value should be a string.
service: input_number.set_value
metadata: {}
data:
value: >-
{{ states('input_number.amortisation') | float +
(states('input_number.einspeisevergutung') | float *
states('sensor.solaranlage_wechselrichter_export_energy_today') | float) +
(state_attr('input_number.strompreis', 'avg_price') | float *
(states('sensor.solaranlage_wechselrichter_solar_generation_today') | float
- states('.solaranlage_wechselrichter_export_energy_today') | float) }}
target:
entity_id: input_number.amortisation
Thank you in advance
6 posts - 3 participants