liangleslie / nea_sg_weather

Home Assistant integration for NEA Weather forecasts
MIT License
27 stars 8 forks source link

Collect frames and create animated rain map gif #8

Closed chpeck closed 1 year ago

liangleslie commented 1 year ago

Good idea, but I'm not sure this is the right way to implement this.

get_image is only called when the frontend is open, so unless your frontend is open for a long while, you won't see any animation.

You should probably GET the last 12 rain images so that you can get your animation loaded right when the frontend is open. Then update the animated gif when a new frame is ready.

edit: the URL for the last 24 rain images can be scraped from here

liangleslie commented 1 year ago

have implemented this feature in the main branch. thanks for the suggestion