Plugin data to attributes

I have made a plugin which pulls weather information for next 7 days. For each day load of information is saved, temperature, wind speed, humidity, etc. currently six.

So what is the best way to share this info to HR:
-Make 7*6 = 42 separate attributes - values could be used whereever
-Make 7 long array - limited to gridview?
-Plugin generates html?

This is something that I too am very undecided on. The OpenWeatherMap plugin shared here in the forum is using a separate device object for each day. That decision was based on my recommendation at the time. I’ve however since been reconsidering it because I don’t know if that is the best approach or not. Use whatever makes the most sense to you. I like all 3 of your options. I might like the 2nd one the most but at this time you can only bind to 1 text field & 1 image field with a GridView array. That’s going to be a limiting factor for you when trying to display multiple fields like temperature, humidity, wind, etc. At some point, there will be an official Home Remote Weather integration. Then there probably will be a preferred way of handling this.

I went for the separate attributes. But used only three per day (weekday, temperature, symbol) for now.

Works ok:
image

1 Like

@Vpow how about posting some images of your setup in the Showcase? I’d love to see it.

OK, added to showcase