Hey guys,
I’ve got an idea for a piston I think would be handy for many however have no idea where to start.
Firstly I can call variable $weather.forecast.forecast.txt_forecast.forecastday.icon which provides me the following data… [clear, chancerain, clear, nt_clear, clear, nt_clear, partlycloudy, nt_clear]
The output returns 36 entries rather than the 8 in the example above, the first result is for the current hour saying its clear outside, the second value is saying that there will be rain from the next hour (i.e. 5pm-6pm) etc etc.
I’m wanting to somehow pull each of these values into variables, so I have something like
@current_hour - clear
@next_hour - chancerain
@three_hour - thunderstorm
etc etc.
I then need to write some complex if statements, that say if its currently clear and the next hour is clear, but anything between three_hour and six_hour then do this action; which my action will be to charge the power wall so if we lose power I still have battery backup.
I’m sure someone out there has written something that will be more user friendly than my idea, plus I would not know where to start with such a piston so not to get it all confused.
Can anyone help?