-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/sensor ac #48
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far! Would you mind deleting the commented-out code and any other stray bits that are no longer necessary?
@@ -171,6 +171,7 @@ def target_temperature(self): | |||
|
|||
@property | |||
def hvac_modes(self): | |||
LOGGER.debug("hvac_modes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can take out these extra debug statements now?
from .wideq import dishwasher | ||
from .wideq import ac | ||
|
||
REQUIREMENTS = ['https://github.com/dacrypt/wideq/archive/master.zip#wideq==1.3.1'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be wrong, but I thought this was already enforced in the top-level module?
from wideq import dishwasher | ||
from . import wideq | ||
from .wideq import dishwasher | ||
from .wideq import ac |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .
and .wideq
don't quite look right—wouldn't that require us to copy the wideq code here?
|
||
for device_id in hass.data[KEY_SMARTTHINQ_DEVICES]: | ||
device = client.get_device(device_id) | ||
model = client.model_info(device) | ||
|
||
LOGGER.debug('SMARTTHINQ_DEVICE: %s' % device.type) | ||
LOGGER.debug('SMARTTHINQ_DEVICE: %s' % wideq.DeviceType.AC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also perhaps unnecessary now? Or perhaps we could just make the messages more readable with English phrases?
elif device.type == wideq.DeviceType.AC: | ||
# base_name = "lg_ac_" + device.id | ||
base_name = device.name + " Power" | ||
LOGGER.debug("Creating new LG AC power sensot: %s" % base_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sensot (spelling)
@@ -53,11 +63,24 @@ def setup_platform(hass, config, add_entities, discovery_info=None): | |||
# Dishwashers are only connected when in use. Ignore | |||
# NotConnectedError on platform setup. | |||
pass | |||
elif device.type == wideq.DeviceType.AC: | |||
# base_name = "lg_ac_" + device.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete?
# restart the task. | ||
self._restart_monitor() | ||
self._failed_request_count = 0 | ||
# class LGACDevice(LGDevice): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe delete this stuff that's no longer in use?
@sampsyo @dacrypt What's the status of this? According to the comments on #44 this seems to work right? I just installed this yesterday, and was very interested in having energy readings myself. |
I would love some help sprucing up the PR to get it into a mergeable state, yes! I unfortunately can't test it myself because neither of my AC units seem to report their power, unfortunately. But happy to take others' word that it works. 😃 |
Well, I think I'm out of luck. I've contacted LG to try to figure out what I'm missing |
No description provided.