sbidy / pywizlight

A python connector for WiZ devices
MIT License
463 stars 79 forks source link

Add __repr__ to wizlight object #142

Closed Teraskull closed 2 years ago

Teraskull commented 2 years ago

This PR contains the following changes:

This allows for easier debugging when printing out a wizlight object:

>>> print(bulb)

# Before:
<pywizlight.bulb.wizlight object at 0x0000022E89D0C160>

# After:
wizlight(ip="192.168.1.2", port=38899, mac="123456789123")
codecov-commenter commented 2 years ago

Codecov Report

Merging #142 (28a9a60) into master (1806dcf) will decrease coverage by 0.09%. The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   90.96%   90.86%   -0.10%     
==========================================
  Files          12       12              
  Lines         874      876       +2     
==========================================
+ Hits          795      796       +1     
- Misses         79       80       +1     
Impacted Files Coverage Δ
pywizlight/bulb.py 90.31% <50.00%> (-0.19%) :arrow_down:

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 1806dcf...28a9a60. Read the comment docs.