-
-
Notifications
You must be signed in to change notification settings - Fork 31.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
Set proper sensor device class for swiss_public_transport #106485
Set proper sensor device class for swiss_public_transport #106485
Conversation
Hey there @fabaff, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
f7d371d
to
8f00ba9
Compare
8f00ba9
to
73821f9
Compare
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
73821f9
to
e1e24fe
Compare
e1e24fe
to
3266b9f
Compare
3266b9f
to
8ca3fcb
Compare
I realized, there might also be (rare) cases where no connection is available, which means |
Please don't force push in your changes. Do regular commits so one doesn't have to review from scratch all the time (perhaps not a big deal on this PR but for the future). |
Ok, no problem |
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.
Thanks @miaucl 👍
…tant#106485) set proper sensor device class
Breaking change
The
native_value
of the sensor is no longer of typestr
(timestamp string) but a properdatetime
. Further, alltimestamps
anddurations
in the additional fields are also proper datetime/duration objects.Proposed change
Set the class of the sensor
departure
toTIMESTAMP
instead of the genericstr
value and provide thenative_value
and the additional attributes accordingly.Also, the values are nullable, as the api sometimes does not have a response to a request. This is now better reflected in a
None
value instead of an emptystr
.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
..coveragerc
.To help with the load of incoming pull requests: