Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 111398

Best Practice

$
0
0

I have an automation that I need to make more robust. It fails following a restart and I need help figuring out how best to work around or remedy the failure.

BACKGROUND: I have hot water heat at home with old mercury switches on 5 different zones. I’ve integrated two Zooz ZEN16s so that the relays act as thermostats, wired in parallel with each of the mercury switches. The mercury switches are left at about 50-55 deg F so that if HA fails, then they will kick on if the temp falls to that point, as a fail-over. Other than control via HA, I also wanted to automate a manual run in each zone if the outside temp falls below freezing and the zone hasn’t turned on in at least 2 hours. This is to prevent pipes from freezing in zones that may get heat from lower floors and may not actually trigger the thermostat to turn that zone on. I create the following automation, which works, except when following a restart, a zone never comes on at least once due to its own thermostat. The problem is the trigger, because I’m using from: "on", but following a restart, it may never come on to begin with, and the trigger will never fire, even if it’s been 2 hours and it is below freezing.

I need help with a trigger. I have other automations that have difficulty with the state of things like this following a restart. I’m curious if anyone has found a creative solution. I thought about having an automation that just toggles on/off the relays upon a restart, but that seems clunky, especially in the Summer. Any advice would be appreciated.

CURRENT AUTOMATION:

  # Cycle Heat Zones if Outside Temp Below Freezing and Zone Hasn't Been ON in a Set timeout
  - id: cycle_heat_zones_atm
    alias: Cycle Heat Zones (ATM)
    mode: parallel
    trigger:
      - platform: state
        entity_id:
          - switch.zooz_zen16_r1s1_tstat_ds
          - switch.zooz_zen16_r1s2_tstat_lr
          - switch.zooz_zen16_r1s3_tstat_mbr
          - switch.zooz_zen16_r2s1_tstat_us
          - switch.zooz_zen16_r2s2_tstat_gar
        from: "on"
        for: "02:00:00"
    condition:
      - condition: template
        value_template: "{{ (states('sensor.sensative_strips_comfort_temperature') | float < 32) or (states('sensor.zooz_zse40_multi_shed_temperature') | float < 32) }}"
    action:
      - service: homeassistant.turn_on
        data:
          entity_id: "{{ trigger.entity_id }}"

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 111398

Trending Articles



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