I have a UPS that is monitored by HA. One of the entities is the Battery Run Time in seconds. I would like to display it in minutes, so need to divided the number by 60.
I have creased a new sensor in configuration.yaml like this:
platform: template
sensors:
Minutes-UPS-600:
friendly_name: "Minutes UPS-600"
unit_of_measurement: 'min'
value_template: "{{ ( states('sensor.ups_600_battery_runtime_2') | int / 60 ) | round(0) }}"
When I test this out in Developer Tools> Template it does the correct division and shows 93 minutes:
It appears my calculation is correct, but after restarting HA no new entity appears showing this value. I assume it would be “sensor.Minutes-UPS-600”.
Seems like I am missing a basic concept here. Can some someone point me in the correct direction?