Broadlink python component, how to update to test new switch type

Hi all!

Apoligies if this is a common question, but i just cant find anything similar on google…

So, i have updated the broadlink python lib here: https://github.com/mjg59/python-broadlink/pull/300

Now i would like to test this in home assistant on my raspberry but i just cannot find a way to replace the original script used? It needs to be in there somewhere but i just cant find it!?

Any ideas so far?

I wonder if i can make a custom component for this, not quite clear on the details for that tho. If i could just find the script that i need to update that would be so much easier, but i think thats not the way intended from the devs…

Update:

I have successfully created a custom component for this now. It’s been quite a task, mostly since i did not have much knowledge about hassio beforehand.

It is somewhat of a hack for not but seems to work very well and i will hopefully continue to update it over time. For now i have not uploaded this code anywhere, it’s not in a ease of use state but anyone who knows python should be able to set up a few devices, it’s not using any config options yet so it’s all hardcoded for each device.

This being said, i’m also pretty happy that it works and also that i think i have some extra features compared to the official broadlink integration… but dont quote me on that since i dont have any other broadlink devices! I also see now that i have not specified that this is regarding to a clas ohlsson SP4 switch, adding that here for anyone who might be searching for the same solution!

IF you want to try this solution for yourself, answer here or ping me and i’ll share it with you, also i’ll try to give a small intro to the current state :slight_smile:

Hi,

I’m interested in trying the custom component for Broadlink. I have a Broadlink SP4 i would like to integrate in Hassio.

Hi, is it possible to share the Custom component for Broadlink sp4 ?

Can you please share with us how you did this?

How do you do this?

Hi, I would be very interested to get this custom component. I’m trying to integrate a lightbulb that is working with the python-broadlink package but not yet in the HA integration.

Hi, what bulb is it? Just curious :slight_smile:
You should be able to fetch from github and add the component

Hi, the bulb I’m trying to connect is the Light bulb LB1. it’s supported on the github repo of python-broadlink: GitHub - mjg59/python-broadlink: Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs
but the HA-component isn’t updated to support these yet

Right.
I dont have One of those, i guess you could look att My git GitHub - skrutt/broadlink_sp4_customcomponent: First try for an integration of custom component with added broadlink sp4 support

However it’s outdated now, but uses the Python library you linked as a local library so you should (could?) Be able to Stitch it together in a similar way

But i think you would need to create your own combination of the broadlink component and Python lib.

ok, thank you!

Good luck! I found that setting up the custom component was the most tricky part.

Also please tell us how it went!