Page 1 of 1

condition icon on current block

Posted: Mon Jan 08, 2024 10:46 am
by meteoesine
Hi, I would like to show the weather conditions icon but without success because the problem seems to be the current.txt file which is not created/updated in my .../script/forecast/cache folder.
(if I add an user's current.txt file the icon is displayed, but then the file exipres the icon no longer appears)
where I'm wrong? something is missing?
tnx for any comments

Re: condition icon on current block

Posted: Mon Jan 08, 2024 12:17 pm
by steph
I'm also interested in this icon if anyone has a solution. :D

Re: condition icon on current block

Posted: Mon Jan 08, 2024 3:23 pm
by davidefa
You need:
- block current >= v24.5
- in block setup: enable current conditions icon using openweather api
- in meteotemplate main setup, in place of darksky api key ( now useless ) insert your openweather api key

current02.png
current02.png (324.47 KiB) Viewed 8761 times

Re: condition icon on current block

Posted: Mon Jan 08, 2024 3:46 pm
by meteoesine
Ciao Davide,
ho già tutto, compresa l'ultima versione del blocco.
secondo me il problema è il file .../script/forecast/cache/current.txt che non si genera

if(file_exists("../../../pages/forecast/cache/current.txt")){

ce le hai ancora le credenziali per entrare nel mio hosting se vuoi fare delle prove?
grazie

Re: condition icon on current block

Posted: Mon Jan 08, 2024 9:39 pm
by davidefa
Had to update the block due to changes in openweather free api calls.
The 'one call api 2.5' is not available to new subscription ( mine from 2021 is still valid )

v24.6 - Jan 08, 2024
- modified openweather call from 'onecall' ( now available on subscription; 1000 free calls/day ) to 'weather' ( free 60/calls minutes; 1000000/month )


P.S.
this update is needed only to show the icon on the right of the block if you have a 'recent' openweather api key ( > end 2022 )

Re: condition icon on current block

Posted: Tue Jan 09, 2024 8:46 am
by steph
Hello,

thanks for the new block it works now for me.
I'll just try to find some new icons as they are very small.
The 01d 02d ect...

Thanks in any case.