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 multiple configs for srp energy #96573
Allow multiple configs for srp energy #96573
Conversation
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.
The tests are still failing, can you take a look?
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
How is this PR solving the issue by adding a location name? |
@gjohansson-ST This is part of an overall update to the integration that is split out between several PRs. This is an energy integration where a user could have several different homes/locations to monitor their energy. Part of the reason why there is an issue is because of the way the upgrade to the integration is split out between multiple PRs |
@joostlek it's been a while since you asked for code changes. I've made the changes. Can you please review and approve? |
e75f2be
to
69ebef4
Compare
A small and friendly notification. Are you planning on moving forward on this PR? ../Frenck |
@frenck yes, I'll take a look this week. Thanks |
bbd724f
to
152979c
Compare
@gjohansson-ST and @joostlek can you please check the review? |
@frenck can you help move this forward. All the changes have been made. Just need a final review |
2940af4
to
a00664c
Compare
@gjohansson-ST let me know if you have any more concerns or feedback. |
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.
LGTM, thanks @briglx 👍
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.
Please address the comments in a new PR. Thanks!
@@ -17,7 +17,7 @@ | |||
"unknown": "[%key:common::config_flow::error::unknown%]" | |||
}, | |||
"abort": { | |||
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" | |||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]" |
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.
Change the reference to already_configured_service
.
return self.async_show_form( | ||
step_id="user", | ||
data_schema=vol.Schema( | ||
{ | ||
vol.Required( | ||
CONF_NAME, default=self.hass.config.location_name |
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.
Don't ask for the name here. Just default the title to the location name. The user can change the config entry title afterwards if they want.
Breaking change
Proposed change
Allow multiple configurations for different locations. This includes adding a separate device for each location. The sensor name uses the device name to distinguish between the two energy consumption sensors.
Type of change
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
.To help with the load of incoming pull requests: