Dreo Fan Integration?

Feel free to drop a star rating on the repo.

Will do once I install after work.

Hi does this work with Dreo Nomad One Tower Fan? I couldn’t see what the model no for this is.

Thanks

According to Amazon it’s ‎DR-HTF007
See my GitHub page for the info I need and I can add.

For anyone trying this I’ve updated to use the new Config UX. Let me know if it works?

@JeffSteinbok I own 3 Dreo fans, 2 of the tower fans and 1 of the newest multi-oscillating fan ( it oscillates up and down and left and right).

I just installed your integration via HACS, and apparently 1 of the 2 models I have is not supported. The model is DR-HAF004S.

I wanted to thank you for your time, effort, and work on this HACS integration, myself and the community are thankful for your contributions.

If you have the time to add the model I listed here, that would be much, much appreciated and I will be sure to leave a 5 star review when I get it working.

As an aside, given that I have 3 of these fans, I can provide you as much debug, testing, etc as I can to hopefully help catch bugs, copy my logs here, etc. Open Source communities like this are 2 way streets and it’s so important for users to provide developers with the best logs and info we can.

Thanks again.
Matt

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 286, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/dreo/__init__.py", line 61, in async_setup
    load_devices = await hass.async_add_executor_job(manager.load_devices)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreo/pydreo/__init__.py", line 186, in load_devices
    proc_return = self.process_devices(device_list)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreo/pydreo/__init__.py", line 157, in process_devices
    deviceFan = PyDreoFan(dev, self)
                ^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreo/pydreo/pydreofan.py", line 24, in __init__
    self._speed_range = SPEED_RANGES[self.model]
                        ~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'DR-HAF004S'
1 Like

I’d like to add my gratitude as well. Thank you.

1 Like

@JeffSteinbok apologies I just read your README again:

Model: DR-HAF004S
Speeds: 9, and it also has a “Turbo” mode
Oscillating: Yes, both up and down and left and right
Preset modes: “Standard”, “Custom”, and “Turbo”
Temperature: Supported

Created: Add support for DR-HAF004S · Issue #13 · JeffSteinbok/hass-dreo · GitHub

Screenshot from Dreo app:

I appreciate the kind notes.
I may have some time later this week to play around with it.

I’ll see if I can add a HA diagnostics thing, which could dump out the entire blob back from the Dreo APIs which would make things much easier. I actually think I can get things like the modes and max speed back from the server too. I’ll see what I can find.

2 Likes

Thanks a lot for doing this, much appreciated !
Small request can we have an option like speed/oscillate to change mode without having click and go into more info please and temp in celsius. Apologies as i am new to HA if this can already be done, but i couldn’t find an option in Mushroom Fan card to change the fan mode and show temp in celsius on dashboard.

@drashish87 - You can do this yourself already by creating buttons tied to the Services that HomeAssistant exposes on Fans. You can also download a custom Lovelace card that will do this for you. For example:

image

As for the temperature, you can control that in the Dreo app I think. It just sends me back the value as a number. If you wanted to convert it and setting it at Celcius in the app doesn’t work, you can make a template sensor that does the math.

Something like the below:

    sensors:
      main_bedroom_fan_temperature:
        friendly_name: "Main Bedroom Fan Temperature"
        value_template: "{{ (state_attr('fan.main_bedroom_fan', 'temperature') -32 ) * 5/9 }}"
        unit_of_measurement: '°C'
        icon_template: "{{'mdi:thermometer'}}"      
1 Like

Thanks a lot for the reply.

After hours of playing around and writing code with the help of ChatGPT :laughing:
I finally managed to write to make it work just exactly i want.
I managed to put the different modes button below the fan card and also after hours of editing managed to make the colour change as per state of the exact mode on , so that by glacing I know which mode is currently the fan is working on.
Just to my liking.

Few things left is to change the state show the fan speed in numbers like 1,2,3,4 instead of %.
Also trying to find an option set a timer feature like the dreo app
Attaching the screenshot of the card I have created.
Thanks again for making the dreo plugin for HA!

I don’t see Dreo Smart Device within HACS

Did you add the repo?

I missed that step and went straight to the search in HACS part :slight_smile:

Additional device request:

DR-HAP003S
DR-HAF003S

:slight_smile:

I can provide more mode/settings (list) later when I can sit down with it all :slight_smile:

Please see the instructions on GitHub for what info I need to add a new fan

This is great! Can you share the YAML for your card?
Would it be ok if I put it in the README on GitHub for others?

1 Like

OK! I finally had some time to breath and look over the app for controls. The following information may be a little too much but I’d rather share too much than not enough.

DR-HAF003S (Fan)

  • Power On/Off
  • Speeds: 1 - 8
  • Modes: Auto, Turbo, Normal, Natural, Sleep, Custom
  • Oscillation (Horizontal) On/Off
  • Oscillation (Vertical) On/Off
  • D-Pad (manual directional control oscillation)
  • Timer (turn off after so many minutes or hours)
  • Panel Sound
  • Display Auto-Off On/Off
  • Child Lock On/Off
  • Temperature Unit: F or C
  • Sensors: Temperature

DR-HAP003S (Purifier)

  • Power On/Off
  • Speeds: 1 - 18
  • Modes: Auto, Turbo, Sleep
  • Timer (turn off after so many minutes or hours)
  • Light On/Off
  • Adaptive Brightness On/Off
  • Panel Sound On/Off
  • Child Lock On/Off
  • Display Info: PM2.5, Clean Air, Filter Life
  • Auto Mode Settings: Standard, Soft
  • Sensors: PM2.5, Clean Air

Again, this is likely more information than you need (or maybe even am capable of accessing), but better to have it all than leave anything out!

I actually had that typed out for a bit an forgot to hit enter :smiley:

Absolutely, It’s all about sharing in HA community.

I have attached 2 scripts i have made.
1st option - It will show the mode in which it was last on, even when the fan is off. This way, when you turn on the fan, you will know which mode it will turn on to.

2nd Option - the colour for the mode will only show when fan is on mode.

In either you can turn on the fan by clicking the fan name, adjusting the speed or clicking on the mode.
Hope this helps

1st Option -
type: vertical-stack
cards:

  • type: horizontal-stack
    cards:
    • type: custom:mushroom-fan-card
      entity: fan.smart_fan
      icon_animation: true
      show_percentage_control: true
      show_oscillate_control: true
  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Natural
      secondary: ‘’
      icon: mdi:leaf
      entity: fan.smart_fan
      icon_color: |-
      {% if states[‘fan.smart_fan’].state == ‘off’ %}
      grey
      {% elif states[‘fan.smart_fan’].attributes.preset_mode == ‘natural’ %}
      amber
      {% else %}
      grey
      {% endif %}
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: natural
    • type: custom:mushroom-template-card
      primary: Sleep
      secondary: ‘’
      icon: mdi:moon-waning-crescent
      icon_color: |-
      {% if states[‘fan.smart_fan’].state == ‘off’ %}
      grey
      {% elif states[‘fan.smart_fan’].attributes.preset_mode == ‘sleep’ %}
      purple
      {% else %}
      grey
      {% endif %}
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: sleep
    • type: custom:mushroom-template-card
      primary: Normal
      secondary: ‘’
      icon: mdi:wind-power-outline
      icon_color: |-
      {% if states[‘fan.smart_fan’].state == ‘off’ %}
      grey
      {% elif states[‘fan.smart_fan’].attributes.preset_mode == ‘normal’ %}
      blue
      {% else %}
      grey
      {% endif %}
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: normal
    • type: custom:mushroom-template-card
      primary: Auto
      secondary: ‘’
      icon: mdi:autorenew
      icon_color: |-
      {% if states[‘fan.smart_fan’].state == ‘off’ %}
      grey
      {% elif states[‘fan.smart_fan’].attributes.preset_mode == ‘auto’ %}
      cyan
      {% else %}
      grey
      {% endif %}
      entity: fan.smart_fan
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: auto

2nd Option
type: vertical-stack
cards:

  • type: horizontal-stack
    cards:
    • type: custom:mushroom-fan-card
      entity: fan.smart_fan
      icon_animation: true
      show_percentage_control: true
      show_oscillate_control: true
  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Natural
      secondary: ‘’
      icon: mdi:leaf
      entity: fan.smart_fan
      icon_color: |-
      {% if states[‘fan.smart_fan’].attributes.preset_mode == ‘natural’ %}
      amber
      {% else %}
      grey
      {% endif %}
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: natural
    • type: custom:mushroom-template-card
      primary: Sleep
      secondary: ‘’
      icon: mdi:moon-waning-crescent
      icon_color: |-
      {% if states[‘fan.smart_fan’].attributes.preset_mode == ‘sleep’ %}
      purple
      {% else %}
      grey
      {% endif %}
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: sleep
    • type: custom:mushroom-template-card
      primary: Normal
      secondary: ‘’
      icon: mdi:wind-power-outline
      icon_color: |-
      {% if states[‘fan.smart_fan’].attributes.preset_mode == ‘normal’ %}
      blue
      {% else %}
      grey
      {% endif %}
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: normal
    • type: custom:mushroom-template-card
      primary: Auto
      secondary: ‘’
      icon: mdi:autorenew
      icon_color: |-
      {% if states[‘fan.smart_fan’].attributes.preset_mode == ‘auto’ %}
      cyan
      {% else %}
      grey
      {% endif %}
      entity: fan.smart_fan
      layout: vertical
      tap_action:
      action: call-service
      service: fan.set_preset_mode
      target:
      entity_id: fan.smart_fan
      data:
      preset_mode: auto
4 Likes

@JeffSteinbok I am noticing that my fan will work for limited amounts of time. After awhile it tells me that the command failed because the device is disconnected, but works fine through the app.

1 Like