- id: Main Pump ON
alias: PUMP ON when Solar hot
trigger:- platform: template
value_template: ‘{{ states.sensor.filtrace.state | float - states.sensor.poolled.state
| float > 3.5 }}’
action: - data:
entity_id: switch.filtrace
entity_id: switch.filtrace
service: switch.turn_on
hide_entity: false
- platform: template
- id: Main Pump OFF
alias: PUMP OFF when Solar cold
trigger:- platform: template
value_template: ‘{{ states.sensor.poolled.state | float - states.sensor.filtrace.state
| float > -0.3 }}’
action: - data:
enity_id: switch.filtrace
entity_id: switch.filtrace
service: switch.turn_off
hide_entity: false
- platform: template
In order for the community to help you identify problems in your automations, you need to present them properly formatted.
To format them, place three consecutive backquotes ``` on their own line before and after the code.
Well without seeeing your format, I can already see that you have some wrong information in your services.
In the top automation you have 2 entity_id’s and hide_entity. You should only have 1 and hide_entity is not a valid argument for the service ‘switch.turn_on’.
In the bottom automation you have enity_id and hide_entity. those should not be there as well.
I suggest using the service_call tab in home assistant to find out what are valid attributes for service calls.
if all entities are correct, this could be something to test:
automation:
id: Main Pump ON
alias: PUMP ON when Solar hot
trigger:
platform: template
value_template: >
{{ states('sensor.filtrace')| float - states('sensor.poolled')| float > 3.5 }}
action:
service: switch.turn_on
entity_id: switch.filtrace
id: Main Pump OFF
alias: PUMP OFF when Solar cold
trigger:
platform: template
value_template: >
{{ states('sensor.poolled')| float - states('sensor.filtrace')| float > -0.3 }}
action:
service: switch.turn_off
entity_id: switch.filtrace
Thanks . Now working well. Wrong entity .
Thanks a lot.