Using Summary of more entities value in automation as trigger

Hello Guys,

I would like to turn on boiler if inverter production more than 1500W.

I add this template trigger to automation:
{% (states(‘sensor.solarman_inverter_l1_power’, ‘state’)|float(0)) + (states(‘sensor.solarman_inverter_l2_power’, ‘state’)|float(0)) + (states(‘sensor.solarman_inverter_l3_power’, ‘state’)|float(0)) >1500 %}

I have got this error message:
Message malformed: invalid template (TemplateSyntaxError: tag name expected) for dictionary value @ data[‘value_template’]

What I have to modify here?
Thanks for your advise.

states() function only takes one argument. get rid of the second arguments ‘states’ from each call

also use {{ }}. not {% %}

you might have other issues. post the automation, not just the template if that doesn’t solve it

1 Like

Thank you very much :slight_smile:

1 Like