Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dacrypt
Copy link
Contributor

@dacrypt dacrypt commented May 6, 2020

No description provided.

Copy link
Owner

@sampsyo sampsyo left a 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")
Copy link
Owner

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']
Copy link
Owner

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
Copy link
Owner

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)
Copy link
Owner

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)
Copy link
Owner

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
Copy link
Owner

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):
Copy link
Owner

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?

@naps62
Copy link

naps62 commented Sep 9, 2021

@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 can try to run this branch directly in the meantime, but assuming this works, maybe I can also help clean up the branch?

@sampsyo
Copy link
Owner

sampsyo commented Sep 9, 2021

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. 😃

@naps62
Copy link

naps62 commented Sep 9, 2021

Well, I think I'm out of luck.
According to all official docs & random youtube videos, my AC is suposed to have this sensor. But the option doesn't show on the LG app (as it does on some of the videos I've seen), the button on the remote control seems to do nothing, and my debugging also gives me no results

I've contacted LG to try to figure out what I'm missing

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.

3 participants