-
Notifications
You must be signed in to change notification settings - Fork 13
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
Device registry #74
Device registry #74
Conversation
This was a merge of @NodeJSmith's move_event_socket_to_app_manager branch.
Marking this as draft too, since it as a lot of unrelated changes from the other branches (those should get merged in first, before this one can go) |
It ws more like me just being stupid for skipping running pytest in the first. I'd never use it in the past, but for this kind of project I definitely see the benefit. I see the Ruff is complaining. Did you want me to address those failures as well? |
Man, I'm liking this Ruff fella! I try to be consistent with "style" across files, but I'm always missing something. Ruff is a miracle worker!!! |
Sorry, but if you look at the diff you can see that this has a lot of changes from the websocket move PR for example. Also, I am not sure I understand the motivation for this PR, but since it contains a lot of changes I haven't looked too deep into it. |
The reason I carried all of the changes from the previous PRs is be cause the successive fellas depeneded on those changes.
�
The purpose of this PR was to move the device type determination out of AppliancesManager and into the control of the actual device classes. So, one benefit is that when new devices are added, AppliancesManager doesn’t have to be modified…just __init__.py, types.py (to add a new ApplianceKind), and the device code itself.
�
From: Abílio Costa ***@***.***>
Sent: Friday, January 10, 2025 4:57 PM
To: abmantis/whirlpool-sixth-sense ***@***.***>
Cc: Leland Lucius ***@***.***>; Author ***@***.***>
Subject: Re: [abmantis/whirlpool-sixth-sense] Device registry (PR #74)
�
Sorry, but if you look at the diff you can see that this has a lot of changes from the websocket move PR for example.
Also, I am not sure I understand the motivation for this PR, but since it contains a lot of changes I haven't looked too deep into it.
—
Reply to this email directly, view it on GitHub <#74 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYB5CC3LAVY2WBSSPXZ5GD2KBF5LAVCNFSM6AAAAABU5EOMH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBUGY3TGNJWGI> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ABYB5CF4RV4VLKW42FQI63T2KBF5LA5CNFSM6AAAAABU5EOMH6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTU2B36RU.gif> Message ID: ***@***.*** ***@***.***> >
|
Here’s a comparison between this PR branch and the previous PR branch:
�
lllucius@washer_dryer_split...lllucius:whirlpool-sixth-sense:device_registry
�
From: Abílio Costa ***@***.***>
Sent: Friday, January 10, 2025 4:57 PM
To: abmantis/whirlpool-sixth-sense ***@***.***>
Cc: Leland Lucius ***@***.***>; Author ***@***.***>
Subject: Re: [abmantis/whirlpool-sixth-sense] Device registry (PR #74)
�
Sorry, but if you look at the diff you can see that this has a lot of changes from the websocket move PR for example.
Also, I am not sure I understand the motivation for this PR, but since it contains a lot of changes I haven't looked too deep into it.
—
Reply to this email directly, view it on GitHub <#74 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABYB5CC3LAVY2WBSSPXZ5GD2KBF5LAVCNFSM6AAAAABU5EOMH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBUGY3TGNJWGI> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ABYB5CF4RV4VLKW42FQI63T2KBF5LA5CNFSM6AAAAABU5EOMH6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTU2B36RU.gif> Message ID: ***@***.*** ***@***.***> >
|
Getting a bit difficult to maintain here and would rather just resubmit a clean PR after the other 2 have been resolved. |
This converts all of the Appliance creation to a "registry" of sorts. So when a new device type is added, say a humidifer, then you just need to create the humidifer.py and import it in init.py