Can't seem to get angular number:fraction to work with number:temperature, help needed!

Hey All!

I seem to be having an issue while trying to create a simple widget on habpanel. Code below:

{{itemValue('openweathermap_weather_and_forecast_api_local_current_temperature') | number:0}}
{{'%.02f' | sprintf:itemValue('openweathermap_weather_and_forecast_api_local_current_pressure')/10000}}MPa
Sunrise: {{itemValue('astro_sun_local_rise_start') | date:'HH:mm'}}
Sunset: {{itemValue('astro_sun_local_set_start') | date:'HH:mm'}}
Season: {{itemValue('astro_sun_local_season_name')}}

For some reason, when I created the links, I used the simple setup. The number I get without trying to get rid of the extra digits for example is 12.7665 F. I’d much rather have this rounded to just 13. However when I try the number formatting above for current temp I get a blank. I am thinking because the auto links created items for that specific group as number:temperature. Is there a way to format this to no decimals? Also the barometric pressure is 15 decimal places long and does not work with the supplied code. This is formatted as Number:Pressure. In the widget I just get -NaN. Could someone point me in the right direction?

There are some links in here that may help…

Hmm, would it be possible in angularjs to split the degree f from the result and then perform the number:0? Im extremely new to java/angularjs. Could you or anyone else provide a code sample for this?

Something like {{temp | split:" ":0 | number:0}}degree f


how about
{{ temp.split(' ')[0] }}

Thanks very much Lucky!

Using the weather.returnedvariable.split(’ ')[0] | number:0}}°F worked wonderfully.