Danielhiversen / flux_led

A utility for controlling Flux WiFi Smart LED Light Bulbs
GNU Lesser General Public License v3.0
155 stars 143 forks source link

Improve reliablity of turn on for devices that are slow to update state #359

Closed bdraco closed 2 years ago

bdraco commented 2 years ago

Fixes https://github.com/home-assistant/core/issues/66477

codecov-commenter commented 2 years ago

Codecov Report

Merging #359 (3891088) into master (ec21720) will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #359      +/-   ##
==========================================
+ Coverage   93.71%   93.77%   +0.05%     
==========================================
  Files          15       15              
  Lines        3056     3083      +27     
==========================================
+ Hits         2864     2891      +27     
  Misses        192      192              
Impacted Files Coverage Δ
flux_led/aiodevice.py 98.91% <100.00%> (+0.03%) :arrow_up:
flux_led/base_device.py 97.96% <100.00%> (+0.02%) :arrow_up:
flux_led/const.py 100.00% <100.00%> (ø)
flux_led/protocol.py 99.71% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ec21720...3891088. Read the comment docs.

bdraco commented 2 years ago

We need to add the power state to transition_states as well since we can't trust the 0x81 message for transition time after we change the power state since it's frequently wrong