It gives me a list of 48 readings for the wind speed forecast that I can plot (with another sensor for history) using Apexcharts to show a forecast and history…
However, the results are strings in kph and I want them in mph (by multiplying by 0.62) but I cannot work out how to convert them to real numbers to make the calculation.
Can anyone advise? I have tried |float(0)*0.62 but keep getting errors or undefined.
I have been trying to learn more about map() and didn’t realise that float would be inside it. Is there an idiots guide to where you can learn about these things? …I don’t find the ninja2 docs that easy to understand.
Jinja Docs: As you have discovered, these docs are not geared toward new/casual users, but they contain a lot of important information.
Jinja for Ninjas: @skalavala has put together a well organized tutorial and group of examples. It’s been a while since this was updated, so there are better/easier ways to do some of the things shown, but it’s still a good source.
Many Python methods also to work in templates. I’ve never seen a complete list of which methods work and which don’t… But the Official Python docs have come in handy for me multiple times to figure out what’s going on in templates posted by some of the more advanced users on this forum.