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

Input number automation oddity

$
0
0

@mvsjes2 wrote:

I’m setting up a couple of input_numbers, one to set the time for a fan, and one to turn on a humidifier for a portion of the fan time. In other words, the humidifier time would always be <= the fan time. I’ve set up automation so that when I place the slider for the humidifier above the fan time, the fan time will be increased to match, and when the fan time is set below the humidifier time, the humidifier time is decreased to match. This is obviously to prevent the mister from running when the fan is off.

This works great, except when it doesn’t. It only seems to work about 80% of the time. Other times the automation doesn’t look like it kicks in. No errors in the logs.

I’m very new (1 week) to home assistant and am a bit stumped on how to track this down.

Does anyone have any pointers on how I can debug this? I’ve read in different places that debugging automation is “difficult”, and when you have something that works as you think it should, but intermittently fails, it makes it even more of a head-scratcher.

- alias: 'Synch RH time and fan time'
  trigger:
    platform: state
    entity_id: input_number.fr_humidifier_time
  condition:
    condition: template
    value_template: '{{ states("input_number.fr_humidifier_time") > states("input_number.fr_fan_time") }}'
  action:
    service: input_number.set_value
    data_template:
      entity_id: input_number.fr_fan_time
      value: "{{ states('input_number.fr_humidifier_time') | int(0) }}"

- alias: 'Synch fan time and RH time'
  trigger:
    platform: state
    entity_id: input_number.fr_fan_time
  condition:
    condition: template
    value_template: '{{ states("input_number.fr_humidifier_time") > states("input_number.fr_fan_time") }}'
  action:
    service: input_number.set_value
    data_template:
      entity_id: input_number.fr_humidifier_time
      value: "{{ states('input_number.fr_fan_time') | int(0) }}"
input_number:
  fr_fan_time:
    name: Fan Time
    initial: 70
    min: 0
    max: 120
    step: 10
    unit_of_measurement: Sec
    icon: mdi:timer
  fr_humidifier_time:
    name: RH Time
    initial: 10
    min: 0
    max: 120
    step: 5
    unit_of_measurement: Sec
    icon: mdi:timer

Home Assistant 0.103.6 running straight on ubuntu 18.04 (no docker, no hass.io), python 3.6.9, aarch64 odroid c2.

Thanks!

Posts: 18

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 95925

Trending Articles



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