Comments (11)
So I guess if any of those modes are available for an entity, avoid loading
rgb.csv.gz
etc, and instead just use the HS LUT, no problems? 🤔
Yes that also seems the easiest solution to me. I can have a look into this next friday.
from homeassistant-powercalc.
@bramstroker oh ok thanks! Love you username...lol
from homeassistant-powercalc.
Yes, at the moment rgb mode is not yet supported, but it should not be much work to add that.
How did you discover that you need both hs and rgb for your YeeLight? This does not sound logical to me, I would expect home assistant to control the light by one or the other when changing colors on the color wheel.
I am not sure if I have any hardware which has rgb as a supported mode, I can check that tonight when I am home. When I don't have a light supporting this I am unable to test.
from homeassistant-powercalc.
Could you also check in developer tools, which color modes are supported for your light?
from homeassistant-powercalc.
Sure thing, here's the entity attributes, (I had just taken note of supported_color_modes
to find out):
min_mireds: 153
max_mireds: 588
effect_list:
- Strobe color
- Police
- Christmas
- RGB
- Random Loop
- Fast Random Loop
- LSD
- Slowdown
- Night Mode
- Date Night
- Movie
- Sunrise
- Sunset
- Romance
- Happy Birthday
- Disco
- Strobe epilepsy!
- Alarm
- Police2
- WhatsApp
- Facebook
- Twitter
- Home
- Candle Flicker
- Slow Temp
- Stop
- Warm cycle
- Warm cycle dim
supported_color_modes:
- color_temp
- hs
- rgb
color_mode: rgb
brightness: 255
hs_color:
- 0
- 100
rgb_color:
- 255
- 0
- 0
xy_color:
- 0.701
- 0.299
flowing: false
music_mode: false
friendly_name: Arcana shelves
icon: mdi:floor-lamp
supported_features: 44
Support for all three modes within Yeelight’s API is documented here:
https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf
"COLOR_MODE": Current light mode. 1 means color mode, 2 means color temperature mode, 3 means HSV mode.
I think it’s just a convenience for developers, to pick whichever suits them, they’re functionally identical. Using the Lovelace colour wheel, or the Yeelight app spectrum, it switches to color_mode: rgb
. It only seems to be in hs with a manual service call to light.turn_on
, ie setting hs_color
.
Looks like HASS makes this easy to deal with, though.
https://developers.home-assistant.io/docs/core/entity/light/
If the light is in mode COLOR_MODE_HS, COLOR_MODE_RGB or COLOR_MODE_XY, the light's state attribute will contain the light's color expressed in hs, rgb and xy color format.
If the light is in mode COLOR_MODE_RGBW or COLOR_MODE_RGBWW, the light's state attribute will contain the light's color expressed in hs, rgb and xy color format.
So I guess if any of those modes are available for an entity, avoid loading rgb.csv.gz
etc, and instead just use the HS LUT, no problems? 🤔
from homeassistant-powercalc.
Cool, thanks!
from homeassistant-powercalc.
I have made some changes in branch feature/rgb-mode
are you able to test with this branch in your installation?
I don't have any lights with rgb color mode so I am unable to test fully. Did have a look at this code of the light component in Home Assistant, and they also set the HS values when selecting RGB of XY color mode, so I am pretty sure my changes should work.
from homeassistant-powercalc.
Made another commit to the branch. PR #50 contains the changes for supporting the rgb mode.
from homeassistant-powercalc.
just released 0.2.6 which should include necessary changes to make this work.
from homeassistant-powercalc.
Hi, I’m trying to make LUT files for my Yeelight bulbs. The integration supports color_temp, hs, and rgb modes. I tried making the
rgb.csv
table with a format ofbri,r,g,b,watt
, but fell flat when powercalc realised it doesn’t know what this rgb business is about. 😅2021-07-13 14:34:30 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /home/ha-arcana/.homeassistant/custom_components/powercalc/data/yeelight/YLDP06YL/color_temp.csv.gz 2021-07-13 14:34:30 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /home/ha-arcana/.homeassistant/custom_components/powercalc/data/yeelight/YLDP06YL/hs.csv.gz 2021-07-13 14:34:30 DEBUG (MainThread) [custom_components.powercalc.strategy_lut] Loading data file: /home/ha-arcana/.homeassistant/custom_components/powercalc/data/yeelight/YLDP06YL/rgb.csv.gz 2021-07-13 14:34:30 ERROR (MainThread) [custom_components.powercalc.sensor] Skipping sensor setup light.arcana_shelves: Unsupported color mode rgb
If you can add RGB, I should be able to get this to work. Perhaps having some logic to convert HS table values into RGB would a useful way to do it? Once LUTs are working for this bulb, I can add mine into the repository.
I have some of those YeeLights too were you able to get the LUT files to make them work? Could you post them if you did? Thanks
from homeassistant-powercalc.
@gdreelin you don't have to create a rgb file. Only hs and color_temp are needed.
from homeassistant-powercalc.
Related Issues (20)
- TS011F _TZ3000_w0qqde0g powerplug not yet supported HOT 1
- Measure Tool as Add-on HOT 1
- All Devices off, Powercalc not loading at starting HA, also not with the newest Update HOT 19
- "All standby power" / energy entities do not link back to Powercalc integration HOT 3
- Philips Hue Bloom LC001 HOT 6
- JSONDecodeError and not a valid ColorMode Error during startup since v1.12.12 HOT 15
- Error while dispatching HOT 9
- ability to enter power-on consumption for 'Sonof ZBmini01' via the configure GUI HOT 3
- Why is powercalc trying to reach the internet after installation and setup? HOT 9
- Thanks for the contribution, makes sense to add the alias as you also verified the power draw is similar. HOT 2
- cant delete entries on the integration HOT 9
- Energy sensor have mixed kWh or Wh as unit HOT 10
- light_setting.hue = int(hs[0] / 360 * 65535) ~~^^^ TypeError: 'NoneType' object is not subscriptable HOT 4
- Innr outdoor lights
- Adopt powercalc to change in device info HOT 1
- Add IKEA LED2104R3 GU10 bulb
- Support for multiple-outlet smart outlets and smart strips HOT 20
- Energy sum to retrieve untracked energy HOT 2
- Option flow cleanup HOT 1
- More than 130 powercalc light entities per room. Why? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-powercalc.