Turn a fan on and off based on the difference between a humidity sensor and a baseline

Put requests for new blueprints in #configuration:blueprints.

Can someone please explain how these values are configured? For example; i want to use this to manage my humidifier. Reference value = 50% humidity. I want to turn the switch on when humidity is below 45% and switch off when humidity is above 55%. So should i configure rise and fall both with value 5?

EDIT: Ok i see this isn’t what i’m looking for so i created my own blueprint for this. I will use yours for managing my shower ventilation!

I just wanted to quickly share a solution I have for this using Node Red. I am reading a temp/humidity sensor and providing a desired temp, temp tolerance, desired humidity, and humidity tolerance to regulate climate

I feed this data into a function that allows me to calculate the min/max temps and humidity to display back on my dashboard.


(buttons are sized for display on my phone)

[{"id":"56f5a827.a0a8f8","type":"tab","label":"Tent Temp - Veg","disabled":false,"info":""},{"id":"6780278f.bdef38","type":"server-state-changed","z":"56f5a827.a0a8f8","name":"","server":"fc1437ec.ba4bd8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.5x5_temperature","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":220,"y":40,"wires":[["8f4095a4.c69f78"]]},{"id":"9799a067.ebe32","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Turn On Humidifier","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.plug_1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":260,"wires":[[]]},{"id":"c9987273.3982f","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Turn Off Humidifier","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.plug_1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":320,"wires":[[]]},{"id":"c15d493e.f80ae8","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Turn On Heater","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.plug_6","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1120,"y":20,"wires":[[]]},{"id":"2fcca84e.e361f8","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Turn Off Heater","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.plug_6","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1120,"y":80,"wires":[[]]},{"id":"a5172c97.685e1","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Turn On Fan","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.plug_3","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1110,"y":140,"wires":[[]]},{"id":"c0e22e94.b2fbe","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Turn Off Fan","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.plug_3","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1110,"y":200,"wires":[[]]},{"id":"53e52c2.9185bd4","type":"api-current-state","z":"56f5a827.a0a8f8","name":"Only if off","server":"fc1437ec.ba4bd8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.plug_1","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":940,"y":260,"wires":[["9799a067.ebe32"],[]]},{"id":"60edf74b.02e5e8","type":"api-current-state","z":"56f5a827.a0a8f8","name":"Only if on","server":"fc1437ec.ba4bd8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.plug_1","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":940,"y":320,"wires":[["c9987273.3982f"],[]]},{"id":"108afceb.a24c23","type":"api-current-state","z":"56f5a827.a0a8f8","name":"Only if on","server":"fc1437ec.ba4bd8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.plug_6","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":940,"y":80,"wires":[["2fcca84e.e361f8"],[]]},{"id":"a80f8bb1.2960b8","type":"api-current-state","z":"56f5a827.a0a8f8","name":"Only if on","server":"fc1437ec.ba4bd8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.plug_3","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":940,"y":200,"wires":[["c0e22e94.b2fbe"],[]]},{"id":"1fcf454f.750dab","type":"api-current-state","z":"56f5a827.a0a8f8","name":"Only if off","server":"fc1437ec.ba4bd8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.plug_6","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":940,"y":20,"wires":[["c15d493e.f80ae8"],[]]},{"id":"7da4ad95.4acc64","type":"api-current-state","z":"56f5a827.a0a8f8","name":"Only if off","server":"fc1437ec.ba4bd8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.plug_3","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":940,"y":140,"wires":[["a5172c97.685e1"],[]]},{"id":"20cee686.29affa","type":"server-state-changed","z":"56f5a827.a0a8f8","name":"","server":"fc1437ec.ba4bd8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.climate_tolerance","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":280,"wires":[["8f4095a4.c69f78"]]},{"id":"8f4095a4.c69f78","type":"join","z":"56f5a827.a0a8f8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"6","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":490,"y":200,"wires":[["3abbcca6.d9ab24"]]},{"id":"d9e79789.5ca1f8","type":"server-state-changed","z":"56f5a827.a0a8f8","name":"","server":"fc1437ec.ba4bd8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.climate_temperature","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":190,"y":340,"wires":[["8f4095a4.c69f78"]]},{"id":"f29143a3.3fee1","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Humidifier on pct","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.humi_on_pct","data":"{\"value\":\"{{payload.humidifier_on_pct}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":670,"y":640,"wires":[[]]},{"id":"6c17dbb6.d86f04","type":"server-state-changed","z":"56f5a827.a0a8f8","name":"","server":"fc1437ec.ba4bd8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.5x5_humidity","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":240,"y":100,"wires":[["8f4095a4.c69f78"]]},{"id":"7e688188.acb8d","type":"server-state-changed","z":"56f5a827.a0a8f8","name":"","server":"fc1437ec.ba4bd8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.humidity_tolerance","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":220,"wires":[["8f4095a4.c69f78"]]},{"id":"6115e23a.734a5c","type":"server-state-changed","z":"56f5a827.a0a8f8","name":"","server":"fc1437ec.ba4bd8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.climate_humidity","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":160,"wires":[["8f4095a4.c69f78"]]},{"id":"3abbcca6.d9ab24","type":"function","z":"56f5a827.a0a8f8","name":"Heat, Cool & Humidity","func":"var temp = msg.payload[\"input_number.climate_temperature\"] ;\nvar tol = msg.payload[\"input_number.climate_tolerance\"];\nvar sensor = msg.payload[\"sensor.5x5_temperature\"];\nvar humi = msg.payload[\"input_number.climate_humidity\"];\nvar humitol = msg.payload[\"input_number.humidity_tolerance\"];\nvar humisensor = msg.payload[\"sensor.5x5_humidity\"];\nvar fanon = (temp + (tol + 2));\nvar fanoff = (temp - (tol - 2));\nvar heaton = (temp - (tol + 1));\nvar heatoff = (temp + (tol - 1));\nvar humion = (humi - humitol);\nvar humioff = (humi + humitol);\nmsg.data.temps = {\"current_temp\":sensor, \"set_temp\":temp, \"temp_tol\":tol, \"heat_on\":heaton, \"heat_off\":heatoff, \"fan_on\":fanon, \"fan_off\":fanoff, \"current_humi\":humisensor, \"set_humi\":humi, \"humi_tol\":humitol, \"humidifier_on_pct\":humion, \"humidifier_off_pct\":humioff};\nif (sensor < heaton) {\n\tvar msg1={};\n\tmsg1.payload = msg.data.temps;\n}\nelse if (sensor > heatoff) {\n    var msg2={};\n\tmsg2.payload = msg.data.temps;\n}\nif (sensor > fanon) {\n    var msg3={};\n\tmsg3.payload = msg.data.temps;\n}\nelse if (sensor < fanoff) {\n\tvar msg4={};\n\tmsg4.payload = msg.data.temps;\n}\nif (humisensor < humion ) {\n\tvar msg5={};\n\tmsg5.payload = msg.data.temps;\n}\n\nelse if (humisensor > humioff ) {\n    var msg6={};\n\tmsg6.payload = msg.data.temps;\n}\nvar msg7={};\nmsg7.payload = msg.data.temps;\nreturn[ msg1, msg2, msg3, msg4, msg5, msg6 , msg7]","outputs":7,"noerr":0,"initialize":"","finalize":"","x":660,"y":200,"wires":[["1fcf454f.750dab"],["108afceb.a24c23"],["7da4ad95.4acc64"],["a80f8bb1.2960b8"],["53e52c2.9185bd4"],["60edf74b.02e5e8"],["808df701.f7b6a8","e417f543.69ea88","f6da2c71.218","352da495.30d99c","f29143a3.3fee1","d3c871d3.3496c"]]},{"id":"d3c871d3.3496c","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Humidifier off pct","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.humi_off_pct","data":"{\"value\":\"{{payload.humidifier_off_pct}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":670,"y":700,"wires":[[]]},{"id":"808df701.f7b6a8","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Heat on Temp","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.heat_on_temp","data":"{\"value\":\"{{payload.heat_on}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":660,"y":400,"wires":[[]]},{"id":"e417f543.69ea88","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Heat off Temp","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.heat_off_temp","data":"{\"value\":\"{{payload.heat_off}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":660,"y":460,"wires":[[]]},{"id":"f6da2c71.218","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Fan on Temp","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.fan_on_temp","data":"{\"value\":\"{{payload.fan_on}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":650,"y":520,"wires":[[]]},{"id":"352da495.30d99c","type":"api-call-service","z":"56f5a827.a0a8f8","name":"Fan off Temp","server":"fc1437ec.ba4bd8","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.fan_off_temp","data":"{\"value\":\"{{payload.fan_off}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":650,"y":580,"wires":[[]]},{"id":"fc1437ec.ba4bd8","type":"server","name":"Home Assistant","addon":true}]

My LoveLace Card

type: vertical-stack
cards:
  - type: 'custom:mini-graph-card'
    entities:
      - entity: input_number.climate_temperature
        color: 'rgba(255,255,255,0)'
      - entity: sensor.5x5_temperature
        name: Temperature
        color: 'rgba(248,148,6,1)'
      - entity: sensor.5x5_humidity
        name: Humidity
        color: 'rgba(44,130,201,1)'
      - entity: binary_sensor.night
        name: Day/Night
        color: 'rgba(103,128,159,1)'
        y_axis: secondary
        aggregate_func: min
        show_state: false
        show_points: false
        show_line: false
    hours_to_show: 24
    points_per_hour: 4
    lower_bound: 30
    upper_bound: 85
    show:
      labels_secondary: false
      icon: false
      legend: false
      name: false
    state_map:
      - value: 'off'
        label: Day
      - value: 'on'
        label: Night
  - type: horizontal-stack
    cards:
      - type: 'custom:mini-graph-card'
        name: Temperature
        entities:
          - entity: sensor.5x5_temperature
            show_points: true
        hours_to_show: 1
        points_per_hour: 15
        show:
          labels_secondary: false
          icon: false
          name: false
        color_thresholds:
          - value: 68
            color: '#19b5fe'
          - value: 75
            color: '#f7ca18'
          - value: 82
            color: '#cf000f'
        state_map:
          - value: 'off'
            label: Day
          - value: 'on'
            label: Night
      - type: 'custom:mini-graph-card'
        name: Humidity
        entities:
          - entity: sensor.5x5_humidity
            show_points: false
        hours_to_show: 1
        points_per_hour: 15
        show:
          labels_secondary: false
          icon: false
          name: false
        state_map:
          - value: 'off'
            label: Day
          - value: 'on'
            label: Night
        color_thresholds:
          - value: 40
            color: '#cf000f'
          - value: 55
            color: '#f7ca18'
          - value: 75
            color: '#19b5fe'
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        entity: switch.plug_3
        name: Fan
        icon: 'mdi:fan'
        color: 'rgba(137,196,244,1)'
        show_state: true
        styles:
          card:
            - width: 112px
            - height: 95px
          grid:
            - grid-template-areas: '"i" "n" "s"'
            - grid-template-columns: 1fr
            - grid-template-rows: 1fr min-content min-content
          img_cell:
            - align-self: start
            - text-align: start
          name:
            - justify-self: start
            - padding-left: 10px
            - font-weight: bold
            - text-transform: lowercase
          state:
            - justify-self: start
            - padding-left: 10px
        state:
          - value: 'off'
            styles:
              card:
                - filter: opacity(50%)
              icon:
                - filter: grayscale(100%)
      - type: 'custom:button-card'
        entity: switch.plug_1
        name: Humidifier
        icon: 'mdi:water'
        color: 'rgba(137,196,244,1)'
        show_state: true
        styles:
          card:
            - width: 112px
            - height: 95px
          grid:
            - grid-template-areas: '"i" "n" "s"'
            - grid-template-columns: 1fr
            - grid-template-rows: 1fr min-content min-content
          img_cell:
            - align-self: start
            - text-align: start
          name:
            - justify-self: start
            - padding-left: 10px
            - font-weight: bold
            - text-transform: lowercase
          state:
            - justify-self: start
            - padding-left: 10px
        state:
          - value: 'off'
            styles:
              card:
                - filter: opacity(50%)
              icon:
                - filter: grayscale(100%)
      - type: 'custom:button-card'
        entity: switch.plug_6
        name: Heater
        icon: 'mdi:fire'
        color: 'rgba(207, 0, 15, 1)'
        show_state: true
        styles:
          card:
            - width: 112px
            - height: 95px
          grid:
            - grid-template-areas: '"i" "n" "s"'
            - grid-template-columns: 1fr
            - grid-template-rows: 1fr min-content min-content
          img_cell:
            - align-self: start
            - text-align: start
          name:
            - justify-self: start
            - padding-left: 10px
            - font-weight: bold
            - text-transform: lowercase
          state:
            - justify-self: start
            - padding-left: 10px
        state:
          - value: 'off'
            styles:
              card:
                - filter: opacity(50%)
              icon:
                - filter: grayscale(100%)
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        entity: input_number.climate_temperature
        name: Temp
        color: 'rgb(211, 47, 47)'
        show_state: true
        styles:
          card:
            - width: 90px
            - height: 100px
          name:
            - font-weight: bold
      - type: vertical-stack
        cards:
          - type: 'custom:button-card'
            entity: input_number.climate_temperature
            icon: 'mdi:arrow-up-bold'
            tap_action:
              action: call-service
              service: input_number.increment
              service_data:
                entity_id: input_number.climate_temperature
            color: null
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
          - type: 'custom:button-card'
            entity: input_number.climate_temperature
            icon: 'mdi:arrow-down-bold'
            tap_action:
              action: call-service
              service: input_number.decrement
              service_data:
                entity_id: input_number.climate_temperature
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
      - type: 'custom:button-card'
        entity: input_number.climate_tolerance
        icon: 'mdi:target'
        name: Tolerance
        color: 'rgb(211, 47, 47)'
        show_state: true
        styles:
          card:
            - width: 90px
            - height: 100px
          name:
            - font-weight: bold
      - type: vertical-stack
        cards:
          - type: 'custom:button-card'
            entity: input_number.climate_tolerance
            icon: 'mdi:arrow-up-bold'
            tap_action:
              action: call-service
              service: input_number.increment
              service_data:
                entity_id: input_number.climate_tolerance
            color: null
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
          - type: 'custom:button-card'
            entity: input_number.climate_tolerance
            icon: 'mdi:arrow-down-bold'
            tap_action:
              action: call-service
              service: input_number.decrement
              service_data:
                entity_id: input_number.climate_tolerance
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        entity: input_number.climate_humidity
        name: Humidity
        color: 'rgb(2, 136, 209)'
        show_state: true
        styles:
          card:
            - width: 90px
            - height: 100px
          name:
            - font-weight: bold
      - type: vertical-stack
        cards:
          - type: 'custom:button-card'
            entity: input_number.climate_humidity
            icon: 'mdi:arrow-up-bold'
            tap_action:
              action: call-service
              service: input_number.increment
              service_data:
                entity_id: input_number.climate_humidity
            color: null
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
          - type: 'custom:button-card'
            entity: input_number.climate_humidity
            icon: 'mdi:arrow-down-bold'
            tap_action:
              action: call-service
              service: input_number.decrement
              service_data:
                entity_id: input_number.climate_humidity
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
      - type: 'custom:button-card'
        entity: input_number.humidity_tolerance
        icon: 'mdi:target'
        name: Tolerance
        color: 'rgb(2, 136, 209)'
        show_state: true
        styles:
          card:
            - width: 90px
            - height: 100px
          name:
            - font-weight: bold
      - type: vertical-stack
        cards:
          - type: 'custom:button-card'
            entity: input_number.humidity_tolerance
            icon: 'mdi:arrow-up-bold'
            tap_action:
              action: call-service
              service: input_number.increment
              service_data:
                entity_id: input_number.humidity_tolerance
            color: null
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
          - type: 'custom:button-card'
            entity: input_number.humidity_tolerance
            icon: 'mdi:arrow-down-bold'
            tap_action:
              action: call-service
              service: input_number.decrement
              service_data:
                entity_id: input_number.humidity_tolerance
            show_name: false
            styles:
              card:
                - width: 75px
                - height: 45px
  - type: markdown
    entities:
      - input_number.heat_on_temp
      - input_number.heat_off_temp
      - input_number.fan_on_temp
      - input_number.fan_off_temp
      - input_number.humi_on_pct
      - input_number.humi_off_pct
    content: >-
      **Heat: ON {{states.input_number.heat_on_temp.state}}°F / OFF
      {{states.input_number.heat_off_temp.state}}°F
       Fan: ON {{states.input_number.fan_on_temp.state}}°F / OFF {{states.input_number.fan_off_temp.state}}°F
       Humidifier: ON {{states.input_number.humi_on_pct.state}}% / OFF {{states.input_number.humi_off_pct.state}}%**
3 Likes

Many thanks, this solved the issue I was having controlling my bathroom humidity via a Lutron fan switch. I use my Ecobee thermostat humidity average as the baseline to compare against and it’s been absolutely flawless.

1 Like

I really like the idea of this compared to my separate on/off automations, but this one never seems to trigger for me.

unknown tag !<!input> at line 55, column 38:
     ... ity_id: !input 'humidity_sensor'
                                         ^

When I check the blueprint, I see the above error but I can’t seem to figure out what it’s implying. Anyone able to guide me in the right direction? I can see the humidity values flowing through fine from the sensor so I’m not sure what element is missing (my YAML coding skills are hot garbage).

It’s a blueprint, not an automation. Make sure you update HA.

I can’t tell if this comment is meant to be helpful or an insult. But yes, I know how to import blueprints. I’m saying the automation created by the blueprint never triggers and the code of the blueprint has an error which I listed.

Still doesn’t work for me

2021-01-31 09:16:12 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:17:02 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:17:32 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:18:52 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:19:22 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:19:52 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:21:13 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:21:43 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'
2021-01-31 09:23:03 ERROR (MainThread) [homeassistant.components.automation.humidity_management] Error rendering variables: AttributeError: 'list' object has no attribute 'lower'

Is it possible for someone to edit the original post to remove this problem?

HI @dondochaka,
Thank you very much for this excellent blueprint. I just added it to my setup.

2 Likes

Hi,

I have quite different question/request?
I was looking for something for air purifier, but nothing I can find…

Are you able to modify to use with air purifier? I mean, depends on pm2.5 air sensor, air purifier will go for higher or lower RPM? I mean, f.e.:
If 100% or more then FAN high
if 50% to 100% then FAN MEDIUM
etc.

Hard work? Or should be easy?

Hi all,

has anyone been able to add a condition to only run during specified times? I.E. I dont want the fan to be able to turn on after 8pm or even worse, middle of night.

Thank you.

A WARNING:
Do NOT control your fans based on a comparison of humidity if you want to keep your rooms dry.
The right way to do this is by comparing dew points instead of humidities. The dew point combines the humidity AND the temperature of air into one number that can directly be compared.

If you use humidity alone you risk to pump warm air into a cold room. The warm air might seem dry as long as it is warm, but may become saturated when it is cooled down. This easily happens in summer. That way you may pump humidity into your cool cellar instead of out of it.

The dew point can be calculated from the relative humidity and temperature of air (see Wikipedia article above). Many meteorological services also provide the dew point of the outside air.
Make sure that the dew point of the outside air is some °C below the dew point of the inside air before you start your ventilation. This way you are guaranteed to transport humidity out, not in.

8 Likes

Any way we can get these features in the BP? I want to use this with my attic but I don’t want to pump moist air in. I have a d1mini with a dht11 attached that I can put outside in a covered area that calculates the dew point for me since I cant seem to get open weather map to update the dewpoint.

Why not use the generic hygrostat intergration? You find it in HACS.

1 Like

I would want this for a attic space so it needs to reference a outside value based on dew point inside and outside and then decide if the fan should come on or not. I guess ill have to build something myself.

1 Like

Can you please share it how you did it in node-red

Hello, Thanks for reaching out… I did share my flow in my original post. I am joining all 6 inputs and feeding them to the Javascript function. You will need to update the function to match you inputs. I would be happy to help you get this working. But I need a bit more info on where you are having trouble.

Start by making sure you already have the 6 input objects (temp, humidity, the 4 input boolean for set temp, temp tolerance, set humidity, humidity tolerance). Then import the flow into Node-Red. Update the 6 input objects then open the function and update the item names to match your sensors.

Again, please let me know where you are having a hold up and I can try to assist further.

Did anyone ever figure out this blueprint’s issue that was posted a handful of times?
“AttributeError: ‘list’ object has no attribute ‘lower’”

@derekcentrico
Since Generic hygrostat is currently a thing, and this blueprint is causing an error that the author does not seem to be maintaining / repairing, I suggest you look at that integration first before going here…

1 Like

Rock on, that got my small dehum by the shower functional. Thanks!

1 Like