对不起,更多'关闭主题'的东西,但这是我的模板,为我的距离: -
“{{{'%.3f'|格式(距离(距离)(solual.device_tracker.life360_muttley))}”
所以在dp前得到km,在dp后得到米
它曾经是:-
{{distance(states.device_tracker. life360_mutley) | round(3)}}"
Even if you ignore the epsilon errors, ( I’m at home at the moment ) so i get “0.010” from the top one and I get “0.01” from the bottom, so it’s a) aligned b) easier to read and c) avoids those epsilon errors.
正如你发现的,错误是不一致的(不总是显示)所以这是我的皮带。大括号和一些字符串
0。010是10米
0.01是......挂在......我会在一分钟内到达...... errr!...... 0.01的千米如此...... 10米 - 它更容易