GithubHelp home page GithubHelp logo

corneliousjd / flux_led Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 11.0 25 KB

Modifies homeassistant/components/flux_led/light.py to fix issue where LED lights using MagicHome controller turn off immediately after turning them on with V8 firmware.

Python 100.00%

flux_led's Issues

apply fix for selected led controller

Can i apply this fix for only controller with v8 version? Other magic home controllers work like a charm out of box. If i apply this fix, other contollers stop working right - did not turn on by automatiation or stop working.

Support for RGBW and White controllers with Firmware v5

As you suspected there is a problem when different controllers coexist.
In my case i bought a bunch of White, RGB and RGBW controllers

All RGB are v8 and all White and RGBW are still v5

when i used YOUR code for RGB i had problems with others (turning on from HA did not work for RGBW and White)

So i looked in the code and i think i found a sollution just where you modified it
i added some code in turn_on function just AFTER your modification:

# if not self.is_on:
# self._bulb.turnOn()
if self._mode == MODE_RGBW and not self.is_on:
self._bulb.turnOn()
if self._mode == MODE_WHITE and not self.is_on:
self._bulb.turnOn()

Basicly it applies YOUR modified behaviour only for RGB, and for White and RGBW (with v5) it works as in standard integration.
Maybe it is worth to add this modification to your github.

If you have other ideas - i can test it.

Scan_interval

Are we sure the scan interval setting is in seconds and not ms? The scan_interval suggested is way too aggressive to the point where it slowed not only HA but my whole network to a crawl as well as warnings about entities being slow to trigger in HA log etc.

I commented out the scan_interval and that brought everything back to normal. Polling seems to be unaffected.

Maybe this number needs to be revised?

Suddenly dosent work

Hello all, really thanks for your work, a couple of days ago (I not sure If I did an update) the controller stop working with HACS.

The same issue if I put your changes, or If I delete everything.

Using MagicLight everything works as expected, but as soon I start HASS with or without the Flux-led folder, the lights stop working.

I came back to see if you have updated something or whatever and the last time I put the files manually, this time I try HACS but its not picking the URL.

System Health

version core-2021.7.4
installation_type Home Assistant OS
dev false
hassio true
docker true
virtualenv false
python_version 3.9.5
os_name Linux
os_version 5.10.17-v8
arch aarch64
timezone Europe/Madrid
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4464
Installed Version 1.13.2
Stage running
Available Repositories 843
Installed Repositories 3
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 6.1
update_channel stable
supervisor_version supervisor-2021.06.8
docker_version 20.10.6
disk_total 57.8 GB
disk_used 7.3 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons Visual Studio Code (3.3.0), File editor (5.3.3), Node-RED (8.2.1), Samba share (9.5.1), Terminal & SSH (9.1.3), ArgonOne Active Cooling (23.0), HassOS I2C Configurator (0.13)
Lovelace
dashboards 1
resources 0
views 3
mode storage

No version key

Hello CorneliousJD I've appreciated a lot your fix but today I see this message in home assistant log:
No 'version' key in the manifest file for custom integration 'flux_led'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'flux_led'
Can you fix this?
Thank you

Color is only reported after second click

Well thanks for this, it works! I saw things were going to be implemented in HA in the future that will fix those issues natively, good news.

When changing color, it jumps back to the last color instantly. I have to press the same color twice if I want the UI to update to the color I’ve clicked, I’m not sure if this has been reported before.

Thanks worked

Thanks very much this worked for me also!

Can you submit to HA so it can be updated to the release? thanks

Single colour (monochrome) LED controller not reporting brightness

I have a single colour (monochrome) controller, and reporting and setting brightness does not work. It constantly reports the brightness as 0, and if I try to set the brightness in HA, no errors happen but it does not set the brightness. I suspect that it is because the "w" mode is trying to set the brightness via the white level rather than brightness itself.

I hacked around with the code a little, and managed to get the brightness reporting correctly and setting it if it is below 40%. If I try to adjust the brightness via HA above 40% it simply doesn't work. If I adjust it using the MagicHome app it works perfectly, and it reports the correct brightness to HA.

I got the brightness working by changing the code at approximately line 452-353:

if self._mode == MODE_WHITE:
            self._bulb.setRgbw(0, 0, 0, w=white, brightness=brightness)

and commenting out the following lines at approximately line

        # if self._mode == MODE_WHITE:
        #     return self.white_value

I am completely lost as to why the brightness cannot be set from within HA to higher than 40%.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.