-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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 FireServiceRota/BrandweerRooster integration #38206
Conversation
After a major rewrite of code and pyservicerota package I'm ready to iron out any left overs. |
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.
It looks pretty good to me @cyberjunky. Just a couple of minor things.
This is my first attempt at a code review, so someone from the core team should look over my shoulder.
@austinmroczek I completely overlooked your reviews/audit, didn't see any notification there were audits posted, so I came here to write a small bump post, to get it started ;-) I will work through your advises in the next hours. Thanks! |
@austinmroczek Hi Austin, I have fulfilled all requests, if you have some time please review again if you want, and put it in the next queue. ;D |
@frenck can this be moved to 'follow up review queue' please, it has been there during two HA version releases now. Would like to know what to fix/change and move on some day. In exchange I can do some Hacktoberfest PR's ;-D |
It sounds silly but this integration could potentially save lives. In practice we have seen that the firefighter using this service and integration gets warned of an emergency seconds before their beeper goes off ⏰ |
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 to me. 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. Suggest inheriting the base entity class to reduce boilerplate properties.
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.
There are a few things to fix, but off to a good start
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.
Nice Work
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
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!
extra_inputs = user_input | ||
|
||
if self._existing_entry: | ||
extra_inputs = self._existing_entry |
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.
We seem to be missing test cases in the config flow. It needs 100% test coverage.
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Breaking change
Proposed change
This PR adds code which integrate functionality provided by https://www.fireservicerota.co.uk and https://www.brandweerrooster,nl
"FireServiceRota is a powerful and flexible availability, scheduling and dispatching system for firefighters."
This integration implements the following entities:
In this PR:
Next PR's:
Practical use can be sounding an alarm and/or blinking lights when an emergency incident is received, use text to speech to play incident details while getting dressed, respond with an acknowledge using a door-sensor leaving house or a button or something else connected to home assistant to let your teammates know you are underway.
You need to have a FireServiceRota or BrandweerRooster user account to be able to use this integration (this mostly mean you are a firefighter and your team is using one of those web services for scheduling/alerting)
Type of change
Additional information
Configuration/setup is done via Integration menu asking for user credentials once, and then storing only oauth token information, so a new token can be requested if needed using the refresh token.
It is using python module https://pypi.org/project/pyfireservicerota/ https://github.com/cyberjunky/python-fireservicerota for communication with the API.
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: