šŸŒ” Temperature Control Fan + Ceiling Fan Mode

The code would be great, thanks so much!

@crepetsky

No problem :wink:

Below are 2 sensors. One for a individual person and one for the zone. You will need to decide what suits you. If you would like to track multiple persons then you could create all your person sensors and then group them with a helper. The zone one is for any device in a zone you are tracking. You then would enter this code into your ā€œconfiguration.yamlā€ file and restart home assistant. You will then have the new sensor you can enter into the by-pass.

Things you can change to your liking are;

  • ceiling_fan_zone_person_blacky_sensor - (The name must be unique and be in lower case and if you would like a space then it must be ā€œ_ā€. This is the entity ID of your sensor)
  • Ceiling Fan Zone - Blacky Home Sensor
  • presence
  • mdi:map-marker-account-outline
  • ceiling_fan_zone_sensor - (The name must be unique and be in lower case and if you would like a space then it must be ā€œ_ā€. This is the entity ID of your sensor)
  • Ceiling Fan Zone - Home Sensor

Things you must change (entity name) or check the zone you have

  • device_tracker.blacky_iphone
  • ā€˜homeā€™ - you may have a different zone name other than ā€œhomeā€
  • zone.home

This is for a person.

binary_sensor:
  - platform: template
    sensors:
      ceiling_fan_zone_person_blacky_sensor:
        friendly_name: "Ceiling Fan Zone - Blacky Home Sensor"
        device_class: presence
        icon_template: mdi:map-marker-account-outline
        value_template: >-
          {% if states('device_tracker.blacky_iphone', 'home') %}
            off
          {% else %}
            on
          {% endif %}

This is for a zone.

binary_sensor:
  - platform: template
    sensors:
      ceiling_fan_zone_sensor:
        friendly_name: "Ceiling Fan Zone - Home Sensor"
        device_class: presence
        icon_template: mdi:map-marker-account-outline
        value_template: >-
          {% if states('zone.home')|float > 0 %}
            off
          {% else %}
            on
          {% endif %}

You could have both, so if a bedroom for ā€œblackyā€ has a ceiling fan and when blacky is home the fan will work. You could have another bedroom that is for a different person so you would add another sensor in for that person. But you could have ceiling fans in kitchen then you could use zone or a group helper with all your person sensors selected. You would then use the correct sensor for the automation.

This is using both sensors together. NOTE: We only need one ā€œbinary_sensor:ā€ header.

binary_sensor:
  - platform: template
    sensors:
      ceiling_fan_zone_person_blacky_sensor:
        friendly_name: "Ceiling Fan Zone - Blacky Home Sensor"
        device_class: presence
        icon_template: mdi:map-marker-account-outline
        value_template: >-
          {% if states('device_tracker.blacky_iphone', 'home') %}
            off
          {% else %}
            on
          {% endif %}

  - platform: template
    sensors:
      ceiling_fan_zone_sensor:
        friendly_name: "Ceiling Fan Zone - Home Sensor"
        device_class: presence
        icon_template: mdi:map-marker-account-outline
        value_template: >-
          {% if states('zone.home')|float > 0 %}
            off
          {% else %}
            on
          {% endif %}

Hope this helps.

Blacky :smiley:

2 Likes

New update 1.6

:warning: BLUEPRINT CODE UPDATE :exclamation:

Just a heads up if your still on a old HA version before you update.

From time to time Home Assistant update their code structure and the old code will become ā€œDEPRECATEDā€ stopping / breaking automations from working. It effected this blueprint about 4 to 6 months ago. I wanted to wait some time so everyone had a chance to update their HA version before updating the code as older HA versions can not run the new code. This blueprint has now been updated so it will still operate once HA remove the ā€œDEPRECATEDā€ code from their system. :wink: :+1:

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

How do I set it that when the FAN goes on when passing a valueā€¦ then normally it should go off when below a value. Sometimes it takes too long and would like it to turn off after 45min if it didnā€™t get below that value.

@kimbo1st

Good suggestion, I will look at it tonight and add maximum run time option. Stay tuned for the update.

Blacky :smiley:

1 Like

New update 1.7

New Features :new:

  • Added ā€œMaximum Run Time Option". This allows you to set a maximum run time for the fan if the falling value is not achieved.
  • Added ā€œGlobal Conditionsā€. You can now set any condition you like.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

It seems not to be workingā€¦ settings are the same as before, only set maximum runtime to 60min.

@kimbo1st

Hi Kim

Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā€œ</>ā€ and paste code in there.


alias: Badkamer FAN automatie
description: ""
use_blueprint:
  path: Blackshome/temperature-control-exhaust-fan.yaml
  input:
    trigger_sensor: sensor.shelly_temp_sensor_humidity
    entity_turn_on:
      entity_id: switch.badkamer_ventilator_switch_0
    rising_value: 75
    falling_value: 68
    maximum_run_time:
      hours: 0
      minutes: 45
      seconds: 0
    after_time: "07:00:00"
    before_time: "23:00:00"
    include_maximum_run_time: enabled_maximum_run_time
    include_time: time_enabled

@kimbo1st

Thanks Kim, found a bug, it is fixed and updating now. Let us know if it is working.

Blacky :smiley:

New update 1.8

Bugs Fixes :bug:

  • Fix a bug if no global condition was set the automation would not run.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

1 Like

Hi - this seems to be exactly what iā€™ve been after and as similar posts have suggested I am using it to trigger heating on/off. Thankyou!! :slight_smile:

I do seem to be having issue after my initial testing. If I manually run the blueprint it works as expected.

How frequently does it run, or pull data before a decision is made? Or do I need to something else with this? As it does not yet seem to be ā€œautomatedā€ For info I have enabled time options and during testing they are within the range.

@o0Scope0o

Firstly welcome to the community.

Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā€œ</>ā€ and paste code in there.

Many thanks for the welcome and reply. It is appreciated. As requested please see YAML code below. Hopefully I have just missed something silly(?)

alias: Office Heating
description: ""
use_blueprint:
  path: Blackshome/temperature-control-exhaust-fan-inverted.yaml
  input:
    trigger_sensor: sensor.office_thermostat_temperature
    entity_turn_on:
      device_id: 5c05ea8bbcf9faad96a4a4ab52e2e136
    falling_value: 17
    rising_value: 22
    include_time: time_enabled
    after_time: "08:00:00"
    before_time: "17:00:00"
    weekday_options:
      - mon
      - tue
      - wed
      - thu
      - fri

Edit: I should mention that I am using v1.2 ā€œInvertedā€

No problem, good to know.

I will move this to the inverted blueprint to stop confusion for others reading this.

I have the same problem - I would like to run a script rather than operate a switch but only switch entities show up. HA version up to date.
Iā€™ve tried editing the input code under domain to add ā€œ-scriptā€ but that doesnā€™t seem to work - and I have to admit I have no idea what I an doing.
Any help?

I will PM you.

Blacky :smiley:

Hi Blacky.

I was wondering if you would consider adding the option that if a fan entity is selected, allow setting the fan speed and oscillation.

And thanks, I love your automations.

:thinking: Thanks for you idea, I will add it to the list.

Your welcome.

A really nice option would be to add a time delay to the Trigger Sensor. The Temperature would have to be above Rising Value for X seconds. The same could be added to the Falling value. Also the ability to add scripts to the ran. I would like to send a notification when the fan turns on.

Thanks,