Quantcast
Channel: ESPHome - Home Assistant Community
Viewing all articles
Browse latest Browse all 1486

Differential temperature pump control

$
0
0

@Adhoc77 wrote:

I am new to Home Assistant and I am trying to use part of a configuration yaml from Feb 2018 by xbmcnut & mf_social. I keep getting the error sensor: duplicated. I have used different configs of the above to no avail. I am Using HA with esphome on a esp32. Any help will be much appreciated.

  name: "sensor_diff"
  platform: ESP32
  board: nodemcu-32s
wifi:
  ssid: "xxxx"
  password: "xxxx"
  manual_ip: 
  static_ip: 192.168.1.102
  gateway: 192.168.1.1
  subnet: 255.255.255.0 

api:
web_server:
  port: 80
logger:
ota:
  password: "xxxx"

dallas:
  - pin: 23

# Individual Sensors
sensor:
  - platform: dallas
    address: 0xb80000030864ca28
    name: "panel"
    id: "panel"
  - platform: dallas
    address: 0x60000003084c2b28
    name: "tank"
    id: "tank"
  - platform: value_template
    id: Temperature Difference
    unit_of_measurement: °C
    update_interval: 60s
    lambda: 'return id(panel).state - id(tank).state;'


    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
          {% 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_on_offset:
    name: Pump ON offset
    min: 0
    max: 7
    step: 0.5

  pump_off_offset:
    name: Pump OFF offset
    min: 0
    max: 4
    step: 0.5



automation:
  - id: ID12
    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 %}```
Adhoc77

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1486

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>