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

Initial support for LIFX Ceiling SKY effect #121820

Merged
merged 4 commits into from
Jul 13, 2024

Conversation

Djelibeybi
Copy link
Contributor

@Djelibeybi Djelibeybi commented Jul 11, 2024

Proposed change

Add support for the SKY firmware effect on LIFX Ceiling devices.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@bdraco
Copy link
Member

bdraco commented Jul 12, 2024

If there are no breaking changes in the lib, please split the lib bump into its own PR

@Djelibeybi
Copy link
Contributor Author

Sure, will do so in a couple of hours.

@Djelibeybi Djelibeybi mentioned this pull request Jul 12, 2024
19 tasks
@Djelibeybi
Copy link
Contributor Author

Bump of aiolifx split out to #121824

@Djelibeybi Djelibeybi force-pushed the add-lifx-sky-effect branch from a8fed84 to 65a6352 Compare July 12, 2024 02:02
@@ -97,7 +98,10 @@ async def async_setup_entry(
"set_hev_cycle_state",
)
if lifx_features(device)["matrix"]:
entity: LIFXLight = LIFXMatrix(coordinator, manager, entry)
if device.product in {176, 177}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if 176/177 was a named constant from the lib or a function to tell its a ceiling light

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would. I've asked LIFX to add this to their official products.json file, but in the meantime, there is no other programmatic way to determine what is (or is not) a Ceiling device besides the product ID. I could put this in aiolifx, I guess while I continue to push LIFX to improve their product definitions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could put this in aiolifx, I guess while I continue to push LIFX to improve their product definitions.

That would be a great solution for this case 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a great solution for Home Assistant, but I'm not sure it's a great solution for aiolifx, to be honest. I don't want yet another technical debt because we've hacked something in before LIFX makes it part of the official spec, then I can't roll it back. I'd rather just do it here as a workaround so that other dependents of aiolifx don't use it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not adding or changing any keys. It's just creating a single more easily usable dictionary from the upstream production definitions: https://github.com/LIFX/products/blob/master/products.json

bdraco
bdraco previously requested changes Jul 12, 2024
Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace the unnamed numerical constants with named constants or move them to the library

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft July 12, 2024 04:02
@Djelibeybi Djelibeybi force-pushed the add-lifx-sky-effect branch from a904b46 to 0c96b89 Compare July 12, 2024 04:07
@Djelibeybi Djelibeybi marked this pull request as ready for review July 12, 2024 04:08
@home-assistant home-assistant bot requested a review from bdraco July 12, 2024 04:08
@bdraco bdraco dismissed their stale review July 12, 2024 04:15

changed addressed

@bdraco bdraco added the smash Indicator this PR is close to finish for merging or closing label Jul 12, 2024
@bdraco
Copy link
Member

bdraco commented Jul 13, 2024

Still looks good after sleep. Its been a long week with the hurricane.

@bdraco bdraco merged commit 5f33e85 into home-assistant:dev Jul 13, 2024
26 checks passed
adriencog pushed a commit to adriencog/homeassistant-core that referenced this pull request Jul 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2024
@Djelibeybi Djelibeybi deleted the add-lifx-sky-effect branch July 25, 2024 00:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants