Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesBlonde committed Jun 5, 2017
1 parent b3c2b4c commit 3c2ce9d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions libpurecoollink/dyson.py
Expand Up @@ -225,15 +225,14 @@ def on_message(client, userdata, msg):
userdata.state = device_msg
for function in userdata.callback_message:
function(device_msg)
elif DysonEnvironmentalSensorState.is_environmental_state_message(payload):
elif DysonEnvironmentalSensorState.is_environmental_state_message(
payload):
device_msg = DysonEnvironmentalSensorState(payload)
userdata.environmental_state = device_msg
for function in userdata.callback_message:
function(device_msg)
else:
print("Unknown message"+payload)


_LOGGER.warning("Unknown message: %s", payload)

@staticmethod
def _decrypt_password(encrypted_password):
Expand Down Expand Up @@ -562,7 +561,6 @@ def is_environmental_state_message(payload):
json_message = json.loads(payload)
return json_message['msg'] in ["ENVIRONMENTAL-CURRENT-SENSOR-DATA"]


@staticmethod
def __get_field_value(state, field):
"""Get field value."""
Expand Down Expand Up @@ -607,6 +605,7 @@ def __repr__(self):
str(self.temperature), str(self.dust)]
return 'DysonEnvironmentalSensorState(' + ",".join(fields) + ')'


class DysonNotLoggedException(Exception):
"""Not logged to Dyson Web Services Exception."""

Expand Down

0 comments on commit 3c2ce9d

Please sign in to comment.