Hello,
New to Home Assistant so forgive any newbie mistakes.
I have the following in my Configuration.yaml to create a custom Template Sensor for displaying my UPS Runtime as a Friendly String instead of displaying only the seconds remaining.
sensor:
- platform: template
sensors:
myups_battery_runtime_friendly:
friendly_name: 'UPS Time Remaining'
value_template: "{{ states('sensor.myups_battery_runtime') | int | timestamp_custom('%H Hours, %M Minutes, %S Seconds', 0) }}"
sensor.myups_battery_runtime is currently showing a value of 4944. If I manually do the conversion to hours I get: 1.373333 Hours.
When using the above value_template I am getting: 01 Hours, 22 Minutes, 24 Seconds
Why the difference of ~15 Min?
sensor.myups_battery_runtime is the seconds of remaining battery runtime as returned from the NUT UPS Integration.