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

Allow configuring Starlink sleep schedule #103057

Merged
merged 11 commits into from Mar 18, 2024

Conversation

boswelja
Copy link
Contributor

@boswelja boswelja commented Oct 30, 2023

Proposed change

Adding a switch and the (new) time platform to Starlink to allow users to configure sleep schedule.

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 Black (black --fast 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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@boswelja
Copy link
Contributor Author

This is my first time interacting with time entities - is this intended behavior?
image

1:01 PM is correct, the Starlink app displays the same. However, the time input appears to always be UTC (12:01 AM)

@boswelja boswelja marked this pull request as ready for review December 26, 2023 03:02
@boswelja
Copy link
Contributor Author

boswelja commented Dec 26, 2023

This is my first time interacting with time entities - is this intended behavior? image

1:01 PM is correct, the Starlink app displays the same. However, the time input appears to always be UTC (12:01 AM)

Once this is figured out, I'll open a PR for docs :) I lied

@emontnemery
Copy link
Contributor

@boswelja CI is failing, please fix the issues, then click the "Ready for review" button 👍

@emontnemery emontnemery marked this pull request as draft February 16, 2024 14:34
@boswelja boswelja marked this pull request as ready for review February 18, 2024 00:15
@boswelja
Copy link
Contributor Author

Codecov has dropped, which makes sense since new entities were added, but that also means there's a failing check. I haven't got entity tests set up in starlink yet, is it worth dealing with now?

@bdraco
Copy link
Member

bdraco commented Feb 18, 2024

Its always worth adding tests, but if you don't want to do that, the new file needs to be added to .coveragerc

@boswelja
Copy link
Contributor Author

Its always worth adding tests, but if you don't want to do that, the new file needs to be added to .coveragerc

Fair enough, tests for entities are on my to-do list, I just need to actually get around to it

@home-assistant
Copy link

home-assistant bot commented Mar 5, 2024

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 March 5, 2024 13:23
@boswelja boswelja force-pushed the starlink-sleep-config branch 2 times, most recently from d5a53da to bd35824 Compare March 10, 2024 10:00
@boswelja boswelja marked this pull request as ready for review March 11, 2024 03:46
Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

Looks good, just one question

homeassistant/components/starlink/coordinator.py Outdated Show resolved Hide resolved
Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @boswelja 👍

@emontnemery emontnemery merged commit 34b0ff4 into home-assistant:dev Mar 18, 2024
21 checks passed
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Please address the comment in a new PR. Thanks!

self.hass.async_add_executor_job(
location_data, self.channel_context
),
self.hass.async_add_executor_job(
Copy link
Member

Choose a reason for hiding this comment

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

Don't create concurrent executor jobs. We're not allowed to create more than one executor job at a time. Please run all sync work inside a single function that we schedule once on the executor.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2024
@boswelja boswelja deleted the starlink-sleep-config branch March 29, 2024 04:51
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.

None yet

4 participants