Convert WAN uptime from seconds to hours and minutes?

I am showing WAN uptime for my Eero Pro 6e mesh router using the built-in UPnP integration. It returns the uptime in seconds (e.g. "6348 s), which is only moderately useful. Is there an easy way to return hours and minutes (e.g. 6h 23m)? I feel like I should be able to pipe it into something for the conversion, but not sure how to do it.

- type: entity
  entity: sensor.eero_uptime

There are probably more eloquent ways to do this, but this should do the trick as a template sensor value:

sensor:
  - name: "Uptime"
    state: >-
      {{ (strptime(now().strftime('%Y-%m-%d'), '%Y-%m-%d') + timedelta(seconds =  int(states('sensor.eero_uptime'), 0) )).strftime('%H:%M') }}

Can you customise the entity to include device_class: duration and unit_of_measurement: 's'?

This template sensor preview shows how it will then appear:

If you can’t customise it, set up a template sensor as shown above but with a sensible name and State template of:

{{ states('sensor.eero_uptime') }}