delfick / photons

Python3.6+ asyncio framework for interacting with LIFX devices
https://photons.delfick.com
MIT License
73 stars 6 forks source link

control: improving and optimising the device finder #86

Closed Djelibeybi closed 2 years ago

Djelibeybi commented 2 years ago

This is the first WIP commit for some changes to device finder that allow it to return the label for a switch. As requested initially, this is now done by detecting the type of device first, then sending either GetColor (for lights) or GetLabel (for switches).

I have adjusted most of the tests accordingly, except for device_finder/test_information_retrieval.py. I am still trying to work out how these work.

Signed-off-by: Avi Miller me@dje.li

Djelibeybi commented 2 years ago

GitHub imported the commit comments to the PR. Nifty.

delfick commented 2 years ago

GitHub imported the commit comments to the PR. Nifty.

that is nifty :)

delfick commented 2 years ago

the comments aren't inline though which is less nifty hahhaha

delfick commented 2 years ago

also, goddamnit github markdown for removing the first line if a triple backtick has any text after it on the same line as the triple backtick. I fixed them

Djelibeybi commented 2 years ago

the comments aren't inline though which is less nifty hahhaha

Yep and the commit view of the PR doesn't show them either. My bad. Let me work on the comments you've already made and then we can continue via the PR.

Djelibeybi commented 2 years ago

I'll fix the interactor tests shortly.

Djelibeybi commented 2 years ago

I haven't squashed the commits in case we want to cherry-pick a subset of initial commits.

delfick commented 2 years ago

cool cool. I'll find time to has look maybe tonight or tomorrow :)

On Sun, 2 Jan 2022, 7:17 am Avi Miller, @.***> wrote:

I haven't squashed the commits in case we want to cherry-pick a subset of initial commits.

— Reply to this email directly, view it on GitHub https://github.com/delfick/photons/pull/86#issuecomment-1003612102, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2V5PIZ4QJ5EW2JFKFULLUT5OOTANCNFSM5K43ZDIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Djelibeybi commented 2 years ago

I did some performance testing: https://github.com/delfick/photons/discussions/85

delfick commented 2 years ago

resolved in other PRs. Thanks for doing the prototyping!