You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
532 B

  1. #pragma once
  2. #include <array>
  3. #include <stdexcept>
  4. #include "common.h"
  5. namespace esphome {
  6. namespace yeelight {
  7. namespace bs2 {
  8. class ColorNightLight : public GPIOOutputs {
  9. public:
  10. bool set_light_color_values(light::LightColorValues v) {
  11. values = v;
  12. // Based on measurements using the original device firmware.
  13. red = 0.968f;
  14. green = 0.968f;
  15. blue = 0.972f;
  16. white = 0.0f;
  17. return true;
  18. }
  19. };
  20. } // namespace yeelight_bs2
  21. } // namespace yeelight
  22. } // namespace bs2