Automation on boiler

Dear all,
I have a boiler for hot water, connected with solar and with electricity heater. I have the temperature of the coolant in solar and the temperature in the boiler.
So the question is if the temp of the coolant in solar is between - 30 and +40 degrees to switch on the electricity heater(have sonoff with contactor) . And if the temperature of the coolant is above 40degrees and if the temperature in the boiler reaches 45degrees to turn off the electricity heater.
Since now i made 2 automations but they do not work:

First:
id: ‘1660496824034’
alias: Включване на нагревател на бойлер
description: ‘’
trigger:

  • platform: numeric_state
    entity_id: sensor.sonoff_1001200403_temperature
    below: ‘40’
    above: ‘-30’
    condition: []
    action:
  • type: turn_on
    device_id: adf73672527ef98d48d5419d125629bf
    entity_id: switch.sonoff_10011ff2fb
    domain: switch
    mode: single

And second:

id: ‘1660497058047’
alias: Изключване нагревател Бойлер
description: ‘’
trigger:

  • platform: numeric_state
    entity_id: sensor.sonoff_10011ff2fb_temperature
    above: ‘45’
  • platform: numeric_state
    entity_id: sensor.sonoff_1001200403_temperature
    above: ‘40’
    condition: []
    action:
  • type: turn_off
    device_id: adf73672527ef98d48d5419d125629bf
    entity_id: switch.sonoff_10011ff2fb
    domain: switch
    mode: single

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

1 Like

I don’t know what has happend to the code, but somehow I doubt that you’ve used the GUI to make the automation.

alias: Turn on boiler
description: ""
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.sonoff_1001200403_temperature
    above: "-30"
    below: "40"
condition: []
action:
  - service: homeassistant.turn_on
    data: {}
    target:
      entity_id: switch.sonoff_10011ff2fb
alias: Turn off boiler
description: ""
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.sonoff_10011ff2fb_temperature
    above: "45"
  - platform: numeric_state
    entity_id: sensor.sonoff_1001200403_temperature
    above: "40"
condition: []
action:
  - service: homeassistant.turn_off
    data: {}
    target:
      entity_id: switch.sonoff_10011ff2fb

Why would you turn off your electric heater if the coolant gets below -30? Do you like showering in the cold :smile: