-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Rename "last boot" sensor to "uptime" in Synology DSM #59651
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
Rename "last boot" sensor to "uptime" in Synology DSM #59651
Conversation
Hey there @hacf-fr, @Quentame, mind taking a look at this pull request as it has been labeled with an integration ( |
Thx @mib1185. Simone |
This is a conceptual change, as "last boot" is likely a timestamp where "uptime" indicates the time that has passed since the last reboot? If the value of the sensor is the timestamp of the last reboot (like it should be), maybe naming it like "on since" would be a better choice? |
Relative time (seconds after boot) are not welcome since a lot. A couple of examples:
That said, here we are proposing a change to be more consistent with other integrations; just to name some: Fritz, Shelly, ... Simone |
This would result in a breaking change and would need a bit more love since a migration step needs to be implemented for that 🤔 |
Sounds good to me. I just jumped in to comment on the naming as I had plans to introduce an "uptime" sensor for tplink at some point. Now I know that it should be named "uptime" instead of something else, alas, this naming standard is not codified anywhere as of yet? :-) |
Are you sure this is not a breaking change given the entity name changes? e.g. the sensor is currently named |
It's not a breaking change, as this is in the entity registry. Once registered, the entity name will not change. |
There are also integrations that use lastboot (systemmonitor). The fact that other integrations use the term Uptime does not mean it is correct. If it is a timestamp it should be "Last boot" (or something similar), "Uptime" implies a duration which the entity is not providing. In the frontend "Last boot: Last week" or "Last Boot: 8 November 2021, 20:20" (depending on where you look in the UI) seems more logical than "Uptime: Last Week" or "Uptime: 8 November 2021, 20:20" |
After some thought about it, i would leave it as is, since last boot is more correct. |
Proposed change
This renames the "last boot" sensor to "Uptime" to be more uniform to all others.
Sensors unique_id is not affected by this, so it is not a breaking change.
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
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: