-
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
[wip] Adding dryer and washer support #32
base: master
Are you sure you want to change the base?
Conversation
added deprecation warning to align it with climate.py
Align function parameters with climate.py
Align dishwasher device init with climate device init (note: untested since i don't have LG dishwashers)
I think this is a typo in the readme (looking at the code and the `Lovelace configuration`)
Looks good to me! Instead of duplicating the setup code across the two modules, however, what do you think about factoring it out into a common, shared module that both import? |
@sampsyo i totally agree, but this is as far as my Python code goes right now. I was even thinking of adding some sort of ToString on the device class which would give back something like "_ID" as value. Can you maybe merge this already if it doesn't break anything? |
I cleaned up some code:
|
@sampsyo can you review it until now? |
Hi—the |
Also, it looks like most of the |
Yeah i see that. If you can give me an example of how you think it should be implemented that would help (given the fact that i don't have the right background for that). I think HA calls the setup_platform methods, right? maybe add some sort of utility method which can be called then in the setup_platform method of each appliance type? |
Sure! I was thinking we could create a new module (i.e., a |
Working on that right now @sampsyo can you review my latest update which re-adds the imports to the functions? |
You're on the right track, but please put those after the docstrings. I recommend you take a look at the "diff view" here on GitHub: Where you can see the changes relative to the master branch. You can modify your code so that unnecessary changes don't appear there—meaning that the code is identical to the current master branch except where there's a meaningful change you actually want to make. |
Is my assumption correct that the entity YAML example in the readme; where you say: would mean that it is the 'sensor.py' platform, with named entity as above? Because i am thinking in the lines of creating a sensor.py with 1 'setup_platform' call which can load ALL supported entities from SmartThinq and will generate something like:
Would that be about right? If so; this can be removed from init.py:
And this can be replaced:
With:
Correct? TIA! |
would i even need to call the |
Conflicted with 'LGDevice' in main class.
Hmm; correct me if I'm wrong, but creating everything using the It is also nice to have separate Python modules for the different kinds of devices—putting everything together into one big To be honest, I am not an expert on the HomeAssistant API. (And I didn't even write the dishwasher part of this module…) This page about multiple platforms in a single integration may be relevant: And the people on the HA Discourse may have better answers than I can to general questions about structuring the code. |
The Smartthinq components to load must match the supported HA components; did not know that :-(
btw, @sampsyo reason for my enormous amount of commits was that i had to go via my repo before i could go into my HA install; sorry for that, which basically meant i had to commit a lot of failing code in between... :-( |
(a) Remove try..catch from lookup_bit since a KeyError should not be able to occur (b) update the method comments
@webunity yeah ouch my email was buzzing along all day. But so glad you had time to work on it... I said I was gonna work on it months ago then just sat on my hands soooo... No more errors on load so that is a good sign. its populating N/A for all the states so far will need to start my dryer when I get some to get some data. But looks like you got it. |
Looks good running, Need to map temperature control labels will try to get you them all... temperature control |
Can you try and post your JSON url for your model? (you can get it maybe
from the example.py script)
Then i can add the missing variables.
…On 2019-11-13 05:07, stboch wrote:
Looks good running,
Need to map temperature control labels will try to get you them all...
temperature control
@WM_DRY27_TEMP_MID_HIGH_W
--
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
Links:
------
[1]
#32?email_source=notifications&email_token=AABNN3KZEAZQMWZSHAAFNTLQTN4RLA5CNFSM4JDP2RMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED4Z4BI#issuecomment-553229829
[2]
https://github.com/notifications/unsubscribe-auth/AABNN3P3RICD4LJH3YQQHOLQTN4RLANCNFSM4JDP2RMA
|
Hello @webunity. I have an LG Washer (Model: F4J8TS2W) with the following states: https://pastebin.com/WhGaPwfy Hopefully you can include it on your fork :) Thanks! |
@sampsyo do you have plans on merging this? because after last pull request i now have merge conflicts which i would like to spend some time on resolving and extending with additional devices but i am not going to maintain my fork indefinitely (as in; it currently works for my use-case already) |
Hi, @webunity—I am certainly quite interested in merging support for washers & dryers in the UI. But I am concerned that this branch has now changed quite a bit of the rest of the component and has reorganized the top-level structure of the code, which makes it pretty hard to review independently. Is there any chance you could summarize the changes that you see as necessary in the overall structure of the component in order to get to W&D support? Then perhaps I can get started on the work to integrate those changes, at which point we can get to a "clean" PR that just adds the new functionality on top of that. |
To be honest that is quite difficult to do; i did not change anything in
the visual representation of the AC for example;
Maybe here is an idea; can you create a branch from master, call it
WasherAndDryer or something then i'll fix the merge conflicts and create
a pull request on that branch. Then people can review those changes
individually without the need to take in master with some risks?
…On 2019-11-28 14:46, Adrian Sampson wrote:
Hi, @webunity [1]—I am certainly quite interested in merging support
for washers & dryers in the UI. But I am concerned that this branch
has now changed quite a bit of the rest of the component and has
reorganized the top-level structure of the code, which makes it pretty
hard to review independently.
Is there any chance you could summarize the changes that you see as
necessary in the overall structure of the component in order to get to
W&D support? Then perhaps I can get started on the work to integrate
those changes, at which point we can get to a "clean" PR that just
adds the new functionality on top of that.
--
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
Links:
------
[1] https://github.com/Webunity
[2]
#32?email_source=notifications&email_token=AABNN3K3UMVHIPVT4U4GQ63QV7DUHA5CNFSM4JDP2RMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFMU2TQ#issuecomment-559500622
[3]
https://github.com/notifications/unsubscribe-auth/AABNN3KEARULYOKBJIVNLGTQV7DUHANCNFSM4JDP2RMA
|
Sure. While I understand that this might be more difficult than it sounds, here's how I would do it in my wildest dreams:
If separating that out seems too hard, I will instead try to get to work understanding exactly what needs to be done in the reorganization so I can facilitate Step 2 alone. In the mean time, I don't think it matters too much whether the code lives in a branch here or in your fork. |
...I would greatly appreciate this support... This is the last set of devices to add to HA for me to have everything linked up! Very much appreciate the effort here. |
…u merged PR (sampsyo/hass-smartthinq#32) to enable Washer & Dryer integration
Any updates? Would be great to have support for the washers and dryers. |
Hello, |
Hey guys, sorry for not updating you; but it currently works for me in my own environment. Since then people have been adding stuff so i either have to start all over bit by bit as @sampsyo suggested or abandon this pull request. Either way, i might be able to take a crack at it but it won't be soon (to busy atm) |
Hi, |
You need to pull down from webunity's repo and put that into custom_components and also follow the directions in the readme to get your token. |
Hi, |
I browsed through the code and i only see items pertaining to dishwashers, HVAC, and dryers, not clothes washers. |
Hi, I'm also interested in getting this functionality having a Dryer, a Washing Machine and a Fridge. I've checked out the PR, fixed a little bug with a wrong variable that was preventing dryers to get picked up and I can report that it works ok! I'm netiher a python nor a HA expert but I'd be interested in helping with this and I'm planning to provide a PR soon. |
sensor.py
Outdated
add_devices(dishwashers, True) | ||
|
||
if dryers: | ||
for device in dishwashers: |
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.
hi, there is an error here. it should be in dryers
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.
Thanx, fixed!
Have you guys looked into this new repo? Already have authentication via UI, set up in the HA integrations and only support for washers so far but looks promising. |
It's sorta troubling that it copies the wideq code into the repository instead of depending on the PyPI release? And it's also disappointing that it does so without attribution or incorporating the license of the original code. 😞 I guess we can hope that they'd contribute the authentication flow back to this repository. |
Resolve merge conflicts in #32
Any update on this pull request? Just ordered LG ThinQ (what a dumb name) washer & dryer and would be great to integrate into my HA system. |
(see descriptions of respective commits for more info)