PaulAnnekov / tuyaha

Implements the special Tuya Home Assistant API.
Other
141 stars 106 forks source link

Better __repr__ for devices #32

Closed Faboor closed 4 years ago

Faboor commented 4 years ago

This changes the repr of devices in output from

<tuyaha.devices.light.TuyaLight at 0x7fb17e70a4e0>

which is the python default object representation to a bit more useful one with the device name and id:

<tuyaha.devices.light.TuyaLight: "Bedroom light" (bf53d1b52c385e4df8ghpy)>
Faboor commented 4 years ago

Please feel free to amend this with a different repr, this is mostly meant as a suggestion to replace the default. It makes it easier to see what's going on when using a repl or debug printouts :)

PaulAnnekov commented 4 years ago

I don't see any reason why not to add this method :).