-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Two bugfix and one minor improvement on the VIAGGIATRENO integration #130377
base: dev
Are you sure you want to change the base?
Conversation
The sensor can have both a numeric or a text value, so setting its unit measure causes an error. Removing the unit measure property solves the issue
The Trenitalia Viaggatreno API wants today's updated time to give today's train information. Setting this value in the init updates it only during startup, so i moved it into the async req
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 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 make sure CI is passing
@@ -2,6 +2,8 @@ | |||
"domain": "viaggiatreno", | |||
"name": "Trenitalia ViaggiaTreno", | |||
"codeowners": [], | |||
"dependencies": ["http"], |
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.
Why did you specify the HTTP integration as a dependency?
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 make sure CI is passing
I see, I'll have to build up the whole development environment locally :S
Why did you specify the HTTP integration as a dependency?
beacuse I am ignorant ad i saw from http import HTTPStatus
at the beginning of the sensor.py file. i tried to do the update manifest task to the best of my knowledge
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Proposed change
BUGFIX only: #129026 and #130103
Disclaimer
I am the sole user of the integration, and I well understand why.
It is my first pull request, so please have mercy, i did change 5 lines to make the integration work again. The only checklist here i am sure about is
In general the integration could be a lot better, but I reached a solid basis to start with and I'd like to consolidate that before going forward with some new features.
Type of change
Additional information
Checklist
ruff format 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
.To help with the load of incoming pull requests: