-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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 entity specific force_update for DSMR #46111
Conversation
Hey there @RobBie1221, mind taking a look at this pull request as its been labeled with an integration ( |
Why make it customizable? Can we perhaps come up with better entity specific defaults? |
4Cure Foundation has sent you an email via Gmail confidential mode:
[image: Gmail logo]Re: [homeH-assistant/core] Make force_update customisable for DSMR integration (#46111) <https://confidential-mail.google.com/msg/AJd0jO2p_TQtEkxADsdjDEFqVLP7bRD0QmwMxNrBhgT3wUoetKxSW1yZYQEv9oN_lMUru8uvBht5l-fEuF8Ou8GvcE1xOqkEEyjsGLUmW0v-rpaY-1OJTApj8OMp9pJvkpp6UFBZdxd9djwywfU7n96sulM_b41rLKL4Kdy1l0qApzot1o98Qi4H2Ba_PhOusPD657BUDhCZ6g==>
This message was sent on Feb 6, 2021 at 5:30:48 AM PST
You can open it by clicking the link below. This link will only work for reply@reply.github.com.
View the email <https://confidential-mail.google.com/msg/AJd0jO2p_TQtEkxADsdjDEFqVLP7bRD0QmwMxNrBhgT3wUoetKxSW1yZYQEv9oN_lMUru8uvBht5l-fEuF8Ou8GvcE1xOqkEEyjsGLUmW0v-rpaY-1OJTApj8OMp9pJvkpp6UFBZdxd9djwywfU7n96sulM_b41rLKL4Kdy1l0qApzot1o98Qi4H2Ba_PhOusPD657BUDhCZ6g==>
Gmail confidential mode gives you more control over the messages you send. The sender may have chosen to set an expiration time, disable printing or forwarding, or track access to this message. Learn more <https://support.google.com/mail/answer/7674059>
Gmail: Email by Google
Use is subject to the Google Privacy Policy <https://myaccount.google.com/privacypolicy?hl=en>
Google LLC, 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
You have received this message because someone sent you an email via Gmail confidential mode.
[image: Google logo]
|
I completely agree with you, having defaults specified for each entity would be much easier. But the reason I created the extra option is since I think it is hard to determine which entity should be forced pushed and which not, since this could be different for everyone using this integration. Like a few entities only get updated a few times per day (Tarif) and others every "x"-seconds (Power). |
I think we should limit the number of options presented to the user. Furthermore, the approach is not very generic. If Within the integration we should try to make a default choice taking into consideration the type of data that is represented by an entity. In my opinion, |
That sounds fair. I'll update this PR, with just an extra label for force_update in the obis_mapping list. |
395483a
to
26b1742
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Breaking change
Proposed change
#42086 changed the force_update property for each entity by default to
True
and with #43057 the interval of state updates can be modified. However, in some cases only a few properties are relevant to update every second, and for others it is fine to get updated when there is a new value. With this PR the propertyforce_update
is entity specific instead of defaultTrue
for all.This PR is in conflict when #43405 get merged.
Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: