Enable addressable light power supply based on raw values (#2690)

This commit is contained in:
Oxan van Leeuwen 2021-11-10 23:53:25 +01:00 committed by GitHub
parent e99af991ec
commit bb9793d5b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,7 @@ class AddressableLight : public LightOutput, public Component {
void mark_shown_() {
#ifdef USE_POWER_SUPPLY
for (const auto &c : *this) {
if (c.get().is_on()) {
if (c.get_red_raw() > 0 || c.get_green_raw() > 0 || c.get_blue_raw() > 0 || c.get_white_raw() > 0) {
this->power_.request();
return;
}