Aohzan/hass-prixcarburant

entities not updating

Closed this issue · 17 comments

hi, my entities are not updating (unless i reboot ha)

screenshot295

- platform: prix_carburant stations: - xxxxxxxxx - xxxxxxxxx

do you know what can i do ?

thanks

Salut, j'ai le mm problème. En rechargeant l'intégration ca se met a jours...

Pareil obligé de recharger l'intégration.

Hi !

That's actually a big issue indeed.

I personally update all entities at once by reloading the config entry with an automation, at specific times.

Here is how to do this:

alias: UPDATE - Prix carburant
trigger:
  - platform: time
    at: "08:00:00"
  - platform: time
    at: "11:45:00"
  - platform: time
    at: "17:45:00"
action:
  - service: homeassistant.reload_config_entry
    target:
      entity_id: sensor.station_XXX
mode: single

Update the automation as you wish.
homeassistant.reload_config_entry requires only one entity to update all the config, adding more is useless.

De rien 😉

pareil +1 same issue

Will you implement the correction in order to have at least an update every hour ?
This issue is a show stopper for me before switching from the vinguerha one to yours
Regards
Philippe

Otiel commented

@Quentame I'm getting a memory leak while using an automation like the one you provided. For instance, when trigger is every one hour:

image

The spikes down are when I'm forced to restart Home Assistant because not enough memory is available.

Have you noticed the same issue?

Otiel commented

@Aohzan Why has this been closed? Issue is still present in 2.5.1

Aohzan commented

the original issue have been solved, and like nobody answer for the memory problem since I closed it
I don't have the memory problem, are you sure it come from this integration ? what automation did you use ?

Otiel commented

@Aohzan Sorry, I meant I still have the issue of entities not updating automatically.

I reinstalled hass-prixcarburant 4 days ago, and this is what I have for all my entities:

image

Otiel commented

@Aohzan Any update on this? Is there any log I can provide to help debug this? My entities are still not updating.

Aohzan commented

hello,
did you try the last beta version ? it should update every 30 minutes, and as I changed the update method, it should fix the memory issue
I will add a button to ask price refresh manually

Otiel commented

Hi @Aohzan

Sorry for the late reply, I have tried the 3.0.0 beta versions, then v3.0.0 and v3.1.0 for several days in order to be sure of the integration behavior. I notice the same behavior for all versions: entities are not updated automatically.

image

However, entities are correctly updated when I restart Home Assistant or when I use the new button.prix_carburant_refresh_prices.

What can I do to check what's wrong with the automatic refresh?

Aohzan commented

I have the same issue, I will check that

xontik commented

Is there something we can contribute yo help diagnose ? I have the same bug no update at all on any entities

Personally I made a node red flow that reload the integration every 12h.

Aohzan commented

The issue is fixed in 3.2.0, I added an option to choose the time between two upgrades (default to 4 hours)
Otherwise, you don't have to reload all the integration, you can just call the button entity which only reload prices

Otiel commented

Looks good to me now, prices are correctly refreshed. Thanks a lot @Aohzan ❤️

image