I am trying to format a float inside an alert summary.
This is what I have:
{{ $labels.device_name }} has a zone temperature of {{printf “%.2f” $values.ZONETEMP }}°F with a setpoint of {{$values.EFFECTIVESP}}°F for the last hour. Please inspect unit for proper operation.
But the result is confusing:
ROW1 has a zone temperature of map[%!f(string=de):%!f(string=SS)] 79.60°F with a setpoint of 70°F for the last hour. Please inspect unit for proper operation.
Try this: {{ $labels.device_name }} has a zone temperature of {{printf "%.2f" $values.ZONETEMP.Value }}°F with a setpoint of {{$values.EFFECTIVESP}}°F for the last hour. Please inspect unit for proper operation.