Hi everybody,
I am using the OctoPrint
integration to display several 3d printer statuses in Home Assistant. Unfortunately, octoprint will give the ETA in seconds; I have not found a way to configure this, so I was going to create a template sensor for this:
sensor:
- platform: template
sensors:
mk3s_minutes:
friendly_name: "Prusa MK3S Time Remaining Minutes"
unit_of_measurement: "Minuten"
value_template: "{{ states('sensor.prusa_mk3s_time_remaining') | float / 60 | round(2) }}"
Sometimes, this will display something like 2.25 Minuten
, which is the output I expected. Then again, some other times I’ll get 2.12222222222222223 Minuten
, which means, the round(2)
has not been executed. Right? Why is that?
Also, are any of you using a template like this, and perhaps even have one that will not only convert to minutes, but hours (if ETA is more than one hour)?
Thank you for your ideas