10000 Rename "last boot" sensor to "uptime" in Synology DSM by mib1185 · Pull Request #59651 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Closed

Conversation

mib1185
Copy link
Contributor
@mib1185 mib1185 commented Nov 13, 2021

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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @hacf-fr, @Quentame, mind taking a look at this pull request as it has been labeled with an integration (synology_dsm) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@chemelli74
Copy link
Contributor

Thx @mib1185.
Honestly I think that unique_id should be updated as well.

Simone

@rytilahti
Copy link
Member

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?

@chemelli74
Copy link
Contributor

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.
Instead all sensors should use absolute time (timestamp of last restart):

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

@mib1185
Copy link
Contributor Author
mib1185 commented Nov 13, 2021

Thx @mib1185. Honestly I think that unique_id should be updated as well.

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 🤔

@rytilahti
Copy link
Member

That said, here we are proposing a change to be more consistent with other integrations; just to name some: Fritz, Shelly, ...

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? :-)

@allenporter
Copy link
Contributor

Are you sure this is not a breaking change given the entity name changes? e.g. the sensor is currently named sensor.<name>_last_boot

@frenck
Copy link
Member
frenck commented Nov 14, 2021

Are you sure this is not a breaking change given the entity name changes?

It's not a breaking change, as this is in the entity registry. Once registered, the entity name will not change.

@mvdwetering
Copy link
Contributor
mvdwetering commented Nov 17, 2021

That said, here we are proposing a change to be more consistent with other integrations; just to name some: Fritz, Shelly, ...

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"

@mib1185
Copy link
Contributor Author
mib1185 commented Nov 29, 2021

After some thought about it, i would leave it as is, since last boot is more correct.

@mib1185 mib1185 closed this Nov 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2021
@mib1185 mib1185 deleted the synology_dsm/correct-sensor-naming branch July 31, 2024 17:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0