Uptime in days hours and minutes

So when someone finds this should the doc be corrected or should an issue be created in GitHub on the integration?

At the bottom of all documentation pages, thereā€™s a suggest an edit button that will walk you through the process of giving feedback (issue against doc) or making the change yourself.

All my doc suggestions were summarily dismissed, so I gave up on that.

Itā€™s not going to obvious. If you create a entity via YAML, it will depend based on the integration. If youā€™re providing a name, you should go to developer tools ā†’ states page and search for that name to get the entity_id. This is how itā€™s done for yaml integrations as many old yaml integrations make up random crap for the entity_id.

I was replying to @bschatzow on that. I canā€™t speak for you and what edits you suggested. But in general, if you donā€™t have a cohesive suggestion, it probably wonā€™t have any weight to move forward.

Thanks @petro - as usual, useful info.

I always use entities to find the name when I create an entity or add a service.

I donā€™t assume anything and use the search function to confirm. Just a habit I got into.

That should also work, itā€™s the same search function. Iā€™m not 100% sure old yaml integration entities show up there though.

I have also tried editing in the past and as far as I know none were changed. When people are suggesting changes the doc is not clear to them so they are trying to make it clearer. Maybe there needs to be a sub-group of people that are reviewing the document change requests? What is obvious to developers and experienced users may not be obvious for the inexperienced users. What I was asking above is about what the doc says should happen and what happens. To me adding a dash to the name is a code error not a doc error. There is no way for a user to know.

There is, but as you would expect, itā€™s all devs. For some reason, non-devs are afraid of GitHub.

It doesnā€™t add a dash to the name. The name stays as-is. The name is taken from ā€œHA Runtimeā€ and turned into ha_runtime for the entity_id, so you end up with sensor.ha_runtime with a friendly name of ā€œHA Runtimeā€.

1 Like

Is there in the meantime an easy solution for showing the uptime as DDD:HH:MM:SS (365:23:59:59)?

Actual:

image

type: custom:digital-clock
dateFormat:
  weekday: long
  day: 2-digit
  month: long
timeFormat:
  hour: 2-digit
  minute: 2-digit
  second: 2-digit
locale: de
type: entities
entities:
  - sensor.uptime

You can make a template sensor, but I really donā€™t suggest it. It will just fill up your database.

{{ ((now() - states('sensor.uptime') | as_datetime | as_local).total_seconds() }}

Make sure you set the unit of measurement to seconds with this template. And make the device_class: duration.

It will show as HH:MM:SS