Bond Home Component - Light + Fan

This is what I received when I reported an IFTTT issue:

Thank you for contacting Bond support!

We apologize for the inconvenience that this is causing you. With the old Bond Bridge application, IFTTT will only work until the end of 2019 and if you are using the new bond application, IFTTT will no longer work with the bond. With the new Bond Home application, you may use SmartThings, it has the same feature as IFTTT.

Should you have other questions, please feel free to contact us anytime.

You can use Google Home / Alexa / SmartThings for controlling the speed. Also I think there’s a PR on this component to support speed controls.
Other option for HA is to create a script that calls the Local API, like so:

# on configuration.yaml:
rest_command:
  set_speed_three:
    url: "http://BOND_IP/v2/devices/DEVICE_ID/actions/SetSpeed"
    method: PUT
    headers:
      BOND-Token: !secret my_bond_token
    content_type: application/json
    payload: '{"argument": 3}'

# on scripts.yaml:
set_speed_three:
  sequence:
  - service: rest_command.set_speed_three
  alias: Set Speed 3
1 Like

does anyone know if I have to remove all my old devices before re-adding the fans to Bond in order for this to work? I have two fans controlled via a Bond bridge. They have integrated lights. I can turn the lights on and off fine, but when I try to turn on the fan, I get a message "bond has no attribute “turnfanon”. I read the earlier posts that older devices might have to be deleted and re-added. I re-added one without removing the other ones, in case this didn’t work, but still have the same behavior. Since I can turn the lights on and off fine, it seems like it’s talking to Bond correctly. And I can see the devices in HA. But I can’t do anything with the fans.

did you have to do anything special to get the fan to turn on/off? I installed this, light works fine, but the fan gives me " Failed to call service fan/turn_on. ‘Bond’ object has no attribute ‘turnFanOn’"
Looking around in the bond.py library, I don’t think I see the turnFanOn command, but this is a bit over my head.

The service names are:
‘fan.turn_on’
‘fan.turn_off’

There are a few others as well, but those are the ones you’re looking for.
The above should show up under Developer Tools / Services.

Per the version of the custom component I’m running, this is the code for turning the fan on:

    def turn_on(self, speed=None, **kwargs):
        """Instruct the fan to turn on"""
        self._bond.turnFanOn(self._deviceId)

That defines a service called ‘turn_on’ that is calling the fan with ‘_bond.turnFanOn()’.
This is found in the ‘fan.py’ file.
I think we’re running different integrations.

hmm, I need to look at it some more. I have the same code in my fan.py file you have. In the DevTools/Services, I call fan.turn_on and fan.turn_off, but then I select call service, this pop up shows up on the bottom right with the message I posted earlier.

Thanks for the response.

Hey guys, I pushed an update to the python library that this integration uses last night. I also updated the integration to use the new library but I forgot that a couple functions got renamed in 0.0.5 so that’s probably the problem. Sorry about that! I’ll try to get that fixed ASAP. In the meantime, if you specify 0.0.4 for the bond-home dependency, I bet it will work.

Thank you! that worked great. I downgraded to 0.0.4 and I have spinning fans.

I really appreciate your response.

I just revered the version in GitHub until we get the corresponding changes in the HA integration too. Sorry about that.

Trying to get fan speed merged in soon!

Fan speed would be awesome! Thanks for all the work!

I did it the “hard” way, via de API I checked out the available commands (walkthrough http://docs-local.appbond.com/#section/Getting-Started/Get-Device-Information ) , I added them in configuration.yaml via shell_command and made scripts out of them in “scripts”. And I replaced my IFTTT links with these ones. Works much faster now. (Light and fan speeds working)

Hey guys, there’s a feature request to have more granular Fan Speed control in Home Assistant. That would allow setting an actual speed instead of low/medium/high.
Please vote it up if that’s something you would like to see implemented:

https://community.home-assistant.io/t/numeric-fan-speed/

@nguyer Thank you for this! Enjoy your time with that baby!

Anyone out there have an up_light and down_light config working? I have a Homewerks 7130 bathroom fan that has a light and night light that are mapped through Bond as up_light (toplight) and down_light (bottomlight).

https://www.homewerksww.com/product/bath-fan-led-light-and-bluetoothr-speaker-100-cfm-15-sones

If you have some pointers, great! Otherwise I will post if/when I get something working.

Is anyone successfully syncing their Bond devices with Google via Nabu Casa? I’ve been having issues syncing devices and narrowed it down to this component. The error isn’t descriptive and Nabu Casa has not been able to give me any other information as of yet. So I’m curious if it’s just me or something isn’t playing nice…

I am having no issues here just using fan on and off, and light on and off.

Great work! Worked for me the first time.

One minor issue:

Update for light.tower_fan_light fails

This fan doesn’t have a light, it’s just a tower fan. I’m guessing it’s just a nuisance log entry for now, but nice to fix if possible.

This was really filling up my log, and though I’m not a phyton developer I hacked up a way to fix it. Posting here in case it helps the dev or others.

I replaced line 23 with the following, which filters out devices that do not have a light property.

    # add_entities(BondLight(bond, deviceId) for deviceId in bond.getDeviceIds())
    bondLights = []
    for deviceId in bond.getDeviceIds(): 
        deviceState = bond.getDeviceState(deviceId)
        if 'light' in deviceState:
            bondLights.append(deviceId)
    add_entities(BondLight(bond, lightId) for lightId in bondLights)

I’m sure there are better ways, but…this seems to work.

I saw a mention earlier about this, but any chance of getting this in HACS?

I’d be willing to take a stab at this - I know HACS and git… Only problem is I have an infant and a toddler at home that consume most of my energy (in a good way) beyond the full time job. So I can’t promise a timeline.