plasticrake / tplink-smarthome-api

TP-Link Smarthome WiFi API
MIT License
1.02k stars 141 forks source link

test: refactor bulb/index to ts #138

Closed plasticrake closed 2 years ago

plasticrake commented 2 years ago

Added: lightstate-sysinfo-on lightstate-sysinfo-off lightstate-sysinfo-change lightstate-sysinfo-update

These events are based on sysinfo.light_state, rather than get_light_state. Light strip uses a different format for get_light_state but sysinfo.light_state is normalized and more consistant across models.

codecov[bot] commented 2 years ago

Codecov Report

Merging #138 (edb76e6) into master (f2f7572) will increase coverage by 8.61%. The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
+ Coverage   75.51%   84.13%   +8.61%     
==========================================
  Files          25       24       -1     
  Lines        1352     1229     -123     
  Branches      313      291      -22     
==========================================
+ Hits         1021     1034      +13     
+ Misses        253      115     -138     
- Partials       78       80       +2     
Impacted Files Coverage Δ
src/bulb/lighting.ts 86.66% <ø> (ø)
src/device/index.ts 76.61% <ø> (ø)
src/bulb/index.ts 88.00% <84.21%> (-1.84%) :arrow_down:
src/cli.ts

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 f2f7572...edb76e6. Read the comment docs.