Skip to content

Conversation

@wkd8176
Copy link

@wkd8176 wkd8176 commented Jul 9, 2019

  1. mac address for same type device
  2. model name and model type for specific model division
  3. option item to get option item for searching each device's support function
  4. reference comment for looking up reference commene -> korean dryer has korean comment so i used this
  5. set ac wdirstep for AC's wind direction step function
  6. delete permission for using mobile app and HA at the same time
  7. get power data for AC power consumption
  8. get water usage for water purifier usage
  9. get dust sensor data for AC dust sensor data which has dust sensor

1. mac address for same type device
2. model name and model type for specific model division
3. option item to get option item for searching each device's support function
4. reference comment for looking up reference commene -> korean dryer has korean comment so i used this
5. set ac wdirstep for AC's wind direction step function
6. delete permission for using mobile app and HA at the same time
7. get power data for AC power consumption
8. get water usage for water purifier usage
9. get dust sensor data for AC dust sensor data which has dust sensor
DEFAULT_COUNTRY = 'US'
DEFAULT_LANGUAGE = 'en-US'
#: Represents an unknown enum value.
_UNKNOWN = 'Unknown'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some stray whitespace snuck in here (and elsewhere in this file)?


@property
def model_type(self):
""" get model type"""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the return type of this function? It would be useful to know what kind of data to expect from the API.

self.client.session.set_device_controls(
self.device.id,
value,
)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method doesn't seem to be called anywhere. Can you clarify what it's useful for?

if code != '0000':
raise MonitorError(device_id, code)
else:
return data
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods seem to be AC-specific. Maybe they should be located in the ac module?

@gladhorn
Copy link
Collaborator

@wkd8176 This looks like some good additions, could you please break it into even smaller bits (and avoid all the white-space changes, they make it very hard to review). As @sampsyo says, some of this should go into the AC parts of the code.

from typing import Any, Optional

from . import core
from . import core
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid indent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants