Breaking change on 0.67 for Broadlink

me too, broadlink sp3 doesn’t seem to work anymore.

I found the entity id’s of the devices controlled by my RM-mini had changed:

switch.samsung_bluray_power: to switch.stereo:
switch.samsung_tv_power: to switch.tv:
switch.strip_light: to switch.led:

My Sp3 disappeared in 67.0

My Sp2 disappeared also.
When a fix is planned ?

It is no longer using friendly names in groups and automations, change these and it will be up and running again…

My broadlink mp1 also dissapear from frontend. also doesn’t have any entity_id.

From what you mean. When we create the broadlink switch / we don’t need to use friendly names in configuration.yaml (switch) and group.yaml (group card) ?
Then we can have friendly name of both switch and group by using customize.yaml?

Please advice. Thank you very much.

Same here, checked the entity_id for existence but it wasn’t there. Also in the dev page no sign of any broadlink switches. In my configuration I have changed the (optional) friendlyname and have removed it completely but no success.

Please advice/fix.
Thanks

Hello,

Device: Broadlink SP3
Home Assitant: 67.1

I got my switches to connect but I can not control them through home assistant. I checked the logs and this is what I found. The first is when I try to turn the device on. The second is checking the status and is constantly updating with that error. Anyone have any ideas on how to get them working again.

I have read through the breaking change and did the fixes or so I thought. I can control them through the e-control app so the switches to function.

Thank you to all with advice

Turn on log:

Error executing service <ServiceCall switch.turn_on: entity_id=['switch.device4']>

    Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1002, in _event_to_service_call
    await service_handler.func(service_call)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/switch/__init__.py", line 109, in async_handle_switch_service
    await switch.async_turn_on()
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py", line 219, in turn_on
    if self._sendpacket(self._command_on):
  File "/usr/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py", line 267, in _sendpacket
    self._device.set_power(packet)
  File "/usr/lib/python3.6/site-packages/broadlink/__init__.py", line 394, in set_power
    if self.check_nightlight():
  File "/usr/lib/python3.6/site-packages/broadlink/__init__.py", line 432, in check_nightlight
    if ord(payload[0x4]) == 2 or ord(payload[0x4]) == 3:
TypeError: ord() expected string of length 1, but int found

Status update log:

Update for switch.device4 fails

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py", line 293, in update
    self._update()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/switch/broadlink.py", line 298, in _update
    state = self._device.check_power()
  File "/usr/lib/python3.6/site-packages/broadlink/__init__.py", line 418, in check_power
    if ord(payload[0x4]) == 1 or ord(payload[0x4]) == 3:
TypeError: ord() expected string of length 1, but int found

Logs Screen shot

1 Like

I have the same problem !
I fixed it by manually updating the file /homeassistant/deps/lib/python3.6/site-packages/broadlink/__init__.py to its latest version. It has a type check missing.

I reported the issue there : https://github.com/home-assistant/home-assistant/issues/13998

2 Likes

Thank you for the help and for reporting the issue I didn’t want to submit anything because I didn’t really know what was wrong. I checked the git for Broadlink and noticed there was a change a couple days ago. I’m still pretty new at all of this. Thanks again.

After updating to version 0.67 my sp2 broadlink was missing from the HA.
After updating version 0.67.1 it’s shown again but it’s offline.
I can control it using e-control.
Any Solution ?

How can I access this file (init.py) using the Configurator on Hassio ?

I don’t know Hass.io very well. I am sure that you could edit it if you can access the file system of your install using FTP, SFTP or some Folder shares. Sorry I couldn’t help more.

Any a.t.a. on the fix for general use?

Hey all, I just upgraded to Hassio 0.68.0 and 0.68.1 and all my Broadlink Switches disappeared from the UI.

It seems the breaking change that has occurred is the “switch.broadlink_device” entity names have all changed so they’re no longer the “friendly names”. Have a look for your new broadlink entity IDs and make the relevant changes to your YAML file to make them appear.

NOTE: no need to change any custom components, at least for me!

1 Like

Is this going to change back at some point ? Was there are notification given of this change or is this a bug ?

Everything stopped working (broadlink) after 0.67

You just need to remove the friendly names for all the broadlink devices from the config file. Restart home assistant and they should all reappear in entities you can then customize them in customize.yaml

It worked for me no problem. It is listed in the blog in breaking changes

1 Like

This worked for me, thanks

Anybody have problem with broadlink mp1 after upgrade to 0.72.0 /
The broadlink mp1 shows correctly on frontend but cannot control anything.