elboletaire / ha-weatherxm

🌤 A WeatherXM Home Assistant integration
MIT License
2 stars 1 forks source link

Data not refreshed automatically #2

Open DatDraggy opened 2 months ago

DatDraggy commented 2 months ago

Hi, nice integration. Been actually wanting to make one myself once the M5 gets the local api but nice to see others are also interested.

I noticed that the integration only refreshes the data about once a day, is this an api limitation or an issue in the integration? I don't really need the integration when it only shows me the current nightly values since that's when it updates.

Thanks

DatDraggy commented 2 months ago

Confirmed via Discord to be a bug currently

elboletaire commented 2 months ago

I was answering here too ^^' I was saying...

It's more than likely an issue with the integration. As my very first HA integration, it still has some things to work around. One is the update issue, which will need a review on how the data fetch is done. I thought I set it to update every 10 minutes, but since I'm an HA newbie, I probably messed something up (see https://github.com/elboletaire/ha-weatherxm/blob/main/custom_components/weatherxm/__init__.py#L45).

I'm on vacation right now, so I'm probably not gonna be able to work on this for a week or two, but feel free to open a PR if you want.

gurkburk76 commented 1 month ago

Just installed this yesterday and experienced the sme thing, had to reload the integration for it to update. Have a good vacation, letäs hope you can fix it later :)

arcidodo commented 4 weeks ago

Awesome you created an hacs app for it! i never get the time to do it so thanks! :-)

work around for the reload data create an automation:

alias: WeatherXM - Reload data
description: ""
trigger:
  - platform: time_pattern
    minutes: /10
condition: []
action:
  - action: homeassistant.reload_config_entry
    data: {}
    target:
      entity_id: weather. station name. 
mode: single
tomkru27 commented 1 week ago

how can i add this automation?

elboletaire commented 1 week ago

how can i add this automation?

Check the official HA documentation https://www.home-assistant.io/getting-started/automation/

tomkru27 commented 1 week ago

thank you, i got it!