Skip to content

Commit

Permalink
Moved from __str__ to __repr__.
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Nov 26, 2017
1 parent cf5a544 commit 9f1e4c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions miio/airpurifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, data: Dict[str, Any]) -> None:
'led': 'off', 'led_b': 2, 'bright': None, 'buzzer': 'off',
'child_lock': 'off'}
A request is limitted to 16 properties.
A request is limited to 16 properties.
"""

self.data = data
Expand Down Expand Up @@ -147,7 +147,7 @@ def motor_speed(self) -> int:
"""Speed of the motor."""
return self.data["motor1_speed"]

def __str__(self) -> str:
def __repr__(self) -> str:
s = "<AirPurifierStatus power=%s, " \
"aqi=%s," \
"average_aqi=%s," \
Expand Down
2 changes: 1 addition & 1 deletion miio/ceil.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def automatic_color_temperature(self) -> bool:
"""Automatic color temperature state."""
return self.data["ac"] == 1

def __str__(self) -> str:
def __repr__(self) -> str:
s = "<CeilStatus power=%s, brightness=%s, " \
"color_temperature=%s, scene=%s, delay_off_countdown=%s, " \
"smart_night_light=%s, automatic_color_temperature=%s>" % \
Expand Down
2 changes: 1 addition & 1 deletion miio/philips_bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def scene(self) -> int:
def delay_off_countdown(self) -> int:
return self.data["dv"]

def __str__(self) -> str:
def __repr__(self) -> str:
s = "<PhilipsBulbStatus power=%s, brightness=%s, " \
"color_temperature=%s, scene=%s, delay_off_countdown=%s>" % \
(self.power, self.brightness,
Expand Down
2 changes: 1 addition & 1 deletion miio/philips_eyecare.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def delay_off_countdown(self) -> int:
"""Countdown until turning off in minutes."""
return self.data["dvalue"]

def __str__(self) -> str:
def __repr__(self) -> str:
s = "<PhilipsEyecareStatus power=%s, brightness=%s, " \
"notify=%s, ambient=%s, ambient_brightness=%s, " \
"eyecare=%s, scene=%s, smart_night_light=%s, " \
Expand Down

0 comments on commit 9f1e4c1

Please sign in to comment.