Skip to content

Question re: pattern for reloading data #2

@stevenbedrick

Description

@stevenbedrick

Hello, and thank you for a wonderful package! I was wondering if you might have any thoughts about the best way to update an AWDevice with more recent data (i.e., refreshing itself from the API, perhaps based on a timer or in response to user input). I can see how to use the getLastMeasurement() method on WeatherPlatform for a given SWKDevice, but that will get me a SWKDeviceData object, and I'm less clear what to do with it from there. Looking at SWKDeviceData (or, rather, AWStationData, which is actually what comes back from the AW API) I don't see a lot of ways to access its data beyond the prettyprint statement, and I can't update my AWDevice object's lastData property.

So I feel like I'm missing something about how the API is intended to be used. Do you have any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions