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

Add new settings screen to change Sensor Update Frequency #2317

Merged
merged 11 commits into from Mar 4, 2022

Conversation

dshokouhi
Copy link
Member

@dshokouhi dshokouhi commented Feb 25, 2022

Summary

Adds a new setting screen for Sensor Update Frequency that allows users to select between 1 of 3 options. Normal, Fast While Charging and Fast Always. When set to any option but Normal we will use the ACTION_TIME_TICK intent. Fast while charging is only available to users who have the Is Charging sensor enabled otherwise it will default to Fast Always.

Enabling this option will require a device restart, much like adding any intents to the Last Update sensor.

Screenshots

image

image

image

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#696

Any other notes

@JBassett
Copy link
Collaborator

I feel like this should be a setting more like the websocket setting rather than 2 toggles with the following options:

  • Normal - 15 minute update time
  • Fast while charging - 1 minute while charging
  • Fast always - 1 minute all the time

@dshokouhi
Copy link
Member Author

I feel like this should be a setting more like the websocket setting rather than 2 toggles with the following options:

  • Normal - 15 minute update time
  • Fast while charging - 1 minute while charging
  • Fast always - 1 minute all the time

I like that, I wasn't sure about the UI either here but will update it later when I'm home. Good suggestion!

@dshokouhi dshokouhi changed the title Add option for faster sensor updates, and also while charging Add new settings screen to change Sensor Update Frequency Feb 28, 2022
@dshokouhi
Copy link
Member Author

Ok implemented the changes to match the other screen. Also took the opportunity to add some text about sensor updates to make things more clear. I ended up adding this to the setting table as well since the options are very similar.

@dshokouhi
Copy link
Member Author

I tested this by:

  • A clean install of the branch
  • Clean install with master did not enter settings or change websocket setting -> deployed branch
  • Clean install with master changed websocket settings -> deployed branch

I believe that covers all DB related issues with adding this field, had some fun setting the default value 😛

@JBassett JBassett merged commit dda9798 into home-assistant:master Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants