Ecobee: set_fan_mode causing error

Hi all, I’m trying to use Home Assistant to run my Ecobee3 fan for 5 minutes if it hasn’t run in the last hour. I’m getting an error trying to use climate.set_fan_mode and I just wanted to post here incase I’m trying to use it wrong before I make an issue on github.

here is the error:

2017-10-26 17:14:19 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/asyncio/tasks.py", line 241, in _step 
    result = coro.throw(exc)
  File "/srv/py35hass/lib/python3.5/site-packages/homeassistant/core.py", line 1026, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/srv/py35hass/lib/python3.5/site-packages/homeassistant/components/climate/__init__.py", line 377, in 
async_fan_mode_set_service
    yield from climate.async_set_fan_mode(fan)
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/local/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/py35hass/lib/python3.5/site-packages/homeassistant/components/climate/__init__.py", line 631, in 
set_fan_mode
    raise NotImplementedError()
NotImplementedError

here is the code from my scripts.yaml

fan_5_minutes:
  alias: Fan for 5 minutes
  sequence:
  - entity_id: climate.home
    service: climate.set_fan_mode
    data:
      fan_mode: 'on'
  - delay:
      minutes: 5
  - entity_id: climate.home
    service: climate.set_fan_mode
    data:
      fan_mode: 'off'

Has anyone else had luck in using climate.set_fan_mode with ecobee?

Documentation has entity_id inside of data. That could be the problem. When in doubt, call the service from the developer console to make sure your json data is correct.

fan_5_minutes:
  alias: Fan for 5 minutes
  sequence:
  - service: climate.set_fan_mode
    data:
      entity_id: climate.home
      fan_mode: 'on'
  - delay:
      minutes: 5
  - service: climate.set_fan_mode
    data:
      entity_id: climate.home
      fan_mode: 'off'

But honestly, this feature is built into the Ecobee, so I’ve just used that and not worried about implementing a solution in HASS.

Thanks, I’ll try moving the entity_id to data, I get the same error using the developer console with this syntax:
{"entity_id":"climate.home","fan_mode":"on"}

This is what I use:

- service: climate.ecobee_set_fan_min_on_time
  data:
    entity_id: climate.downstairs
    fan_min_on_time: 5

NotoriousBDG, that service functions as expected, so it looks like Home assistant is properly communicating with my Ecobee, but I still want to have manual control over the fan setting. For instance, I eventually want to be able to tell a skylight to open, turn on the Ecobee’s fan, close the skylight. or have the fan run 5 minutes if it hasn’t run in 60 minutes, but change that to every 120 minutes after bedtime, etc.

To make the fan run all the time, use the action below. You can then the one I sent earlier to reset it back to 5 mins/hour.

- service: climate.ecobee_set_fan_min_on_time
  data:
    entity_id: climate.downstairs
    fan_min_on_time: 60
1 Like

Thats a good workaround, thanks. I’ll use that for now.

I’ve refactored this to make the thermostat fan mode into a template switch. This method has the advantage of showing the fan’s mode in the UI.

switch:
  - platform: template
    switches:
      thermostat_fan_mode:
        friendly_name: "Thermostat Fan Mode"
        value_template: "{{ states.climate.thermostat.attributes.fan_min_on_time | int > 5 }}"
        turn_on:
          - service: climate.ecobee_set_fan_min_on_time
            data:
              entity_id: climate.thermostat
              fan_min_on_time: 60
        turn_off:
          - service: climate.ecobee_set_fan_min_on_time
            data:
              entity_id: climate.thermostat
              fan_min_on_time: 5
1 Like

Something must have changed, I’m able to set the fan_mode now

- platform: template
  switches:
    fan_mode:
      friendly_name: "Force Fan On"
      value_template: "{{ is_state_attr('climate.home', 'fan_mode', 'on') }}"
      turn_on:
          service: climate.set_fan_mode
          data:
            fan_mode: 'on'
      turn_off:
          service: climate.set_fan_mode
          data:
            fan_mode: 'auto'
1 Like

just finding this - and appreciate the post.

This is actually really annoying - there is no fan: off option.

I want to turn the heating/cooling off when any of the doors are opened, so air isnt just being pumped outside.

Any ideas if this is possible?
Ecobee has a ‘resume service’ option (but not comparative ‘pause service’ option)

I think the only way to do that is to set the fan_min_on_time to 0, and then back to your preferred value later.

1 Like