UKBinCollectionData icon indicating copy to clipboard operation
UKBinCollectionData copied to clipboard

Entities are not updated in line with the 12 hour refresh window.

Open Yorkie71 opened this issue 1 year ago • 5 comments

Asked to submit this issue by Rob. The observed behaviour is that on the day of collection for example, the entity will still show "tomorrow" rather than "today. Eventually it updates and is reflected in the card I have for this. A reload of the integration normally triggers the update.


Not currently configurable - the update is set at every 12 hours to protect council infrastructure.

See: https://github.com/robbrad/UKBinCollectionData/blob/master/custom_components/uk_bin_collection/sensor.py#L127

I think you may have found a bug though - as the display should change but the collection of the data should stay at 12 hours.

Let me take a look at this

@OliverCullimore / @dp247 FYI

Originally posted by @robbrad in https://github.com/robbrad/UKBinCollectionData/discussions/423#discussioncomment-7516074

Yorkie71 avatar Nov 09 '23 10:11 Yorkie71

Could it be this?

https://community.home-assistant.io/t/having-issues-using-dataupdatecoordinator/263251

dp247 avatar Nov 28 '23 09:11 dp247

Just checking in to see if there was any progress on this as the 12 hour update as mentioned is not applying. If I reload the service, all is good but for example, my dashboard is showing the bins should go out tomorrow, which of course, yesterday it was correct, but not today. Not a major thing but slightly takes the edge of what is a really useful integration.

Yorkie71 avatar Jan 31 '24 09:01 Yorkie71

I currently use this automation to ensure that the entities update daily:

alias: Update bin collection dates daily
trigger:
  - platform: time
    at: "00:01:00"
condition: []
action:
  - service: homeassistant.update_entity
    target:
      entity_id:
        - sensor.blue_bin_next_collection_date
        - sensor.grey_bin_next_collection_date
        - sensor.brown_bin_next_collection_date
        - sensor.green_bin_next_collection_date
    data: {}
mode: single

It's obviously not a proper fix but appears to work well enough for now.

jackwilsdon avatar Jan 31 '24 14:01 jackwilsdon

Perfect! That'll do nicely sir, thanks for sharing. It will do the job as a workaround until this minor bug is fixed and prevent me from having to chase after the binmen with my wheelie bin!!

Yorkie71 avatar Jan 31 '24 16:01 Yorkie71

Hi @jackwilsdon I just thought I'd check in to let you know that your workaround works perfectly. Thank you for sharing.

Yorkie71 avatar Feb 07 '24 11:02 Yorkie71

This will be fixed in the next release - tested and no need for the workaround any more

robbrad avatar Jun 02 '24 11:06 robbrad