I posted on the 17th June under ESPHome, Pump Control, which I have now sorted thanks to the members there. I now have a problem with the Configuration.yaml. In Notifications I get the message
“Invalid config” the following integrations and platforms could not be set up: sensor.template .
As before any help in resolving the error is much appreciated.
Code here
sensor:
- platform: template
sensors:
temp_diff:
friendly_name: "temperature_difference"
value_template: >-
{% if ((states.sensor.panel_temperature.state | float ) - (states.sensor.tank_temperature.state | float))
< (states.input_number.pump_on_offset.state | float ) %} pump_off
pump_off
{% elif ((states.sensor.panel_temperature.state | float ) - (states.sensor.tank_temperature.state | float))
> (states.input_number.pump_on_offset.state | float ) %}
'pump_on'
{% else %}
'pending'
{% endif %}
input_number:
pump_off_offset:
name: Pump OFF offset
initial: 0.1
min: 0
max: 2
step: 0.1
pump_on_offset:
name: Pump ON offset
initial: 0.5
min: 0
max: 2
step: 0.5
automation:
- id: ID13
alias: 'Pump hot water if hotter than tank - stop if not'
initial_state: 'on'
trigger:
platform: state
entity_id: sensor.temp_diff
action:
entity_id: switch.solar_pump
service_template: >-
{% if is_state ('sensor.temp_diff' , 'pump_on') %} switch.turn_on
{% else %} switch.turn_off {% endif %}