homeassistant-powercalc
homeassistant-powercalc copied to clipboard
calculation_enabled_condition in GUI ?
Hello,
my question is very simple, can we add calculation_enabled_condition:
feature to GUI mode?
Thanks!
I did not add it on purpose because I want to keep the GUI simple and not too cluttered with options. Only added the imo most used options to the config flow. Maybe I will add an advanced section to the GUI for this option, but need to give this a more thorough thought.
Implemented with #1110
After setting the basic configuration options a separate step is shown where the advanced options can be set. Currently I have only added the calculation_enabled_condition
, but we can add more in the future.
![Screenshot 2022-09-22 at 11 33 31](https://user-images.githubusercontent.com/2345875/191712448-2fb4bd71-d7c6-443f-a676-b210818086d9.png)
You may test this by installing the master branch.
You may test this by installing the master branch.
Works perfectrly! Now I can split yeelight-nightling and main mode for my ceiling lamp, when I calculate power from brightness. Thank you!
Works perfectrly! Now I can split yeelight-nightling and main mode for my ceiling lamp, when I calculate power from brightness. Thank you!
Could you elaborate more on this? Can also be helpful for others.
Could you elaborate more on this? Can also be helpful for others.
Many Yeelight ceiling lights have Nightlight mode. Thats mode, when yellow-white leds using as low as possible power, for example in full darkness round lamps looks like moon. But when we using Yeelight integration we have only one light.* entity (and additional second light.* _ambilight for models with rgb-backlight). Main light.* can be turned on or off, and it will to turn on last mode (main cold-warm light up to max brightness, or nightlight mode). You can enable nightlight mode with services.
The only way to check if nightlight mode is on - take a look at main light.* entity attributes, or look at the binary_sensor.*_nightlight at the device page.
Previously, when I dont use calculation enabled condition
Powercalc always calculate power from brightness up to 60W even if nightlight mode is on (nightlight mode have brightness and can change brightness too).
So: 1 light entity, 1 brightness attr of it, but 2 modes, and I need to template condition to separate them.
Thanks for the extra information. I am closing this issue.