question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Date already on the collection schedule

See original GitHub issue

Before you submit a new bug report, please check that

Describe the bug

Thanks for this addon which I enjoyed very much. I created a sensor with blank frequency, manual update and related automation to add dates. At the run of the new day I get date error already present.

No error when restart ha and the date is addesd.

Am I wrong something? Thanks.

My automation is :

  • id: ‘veritas_ecomobile’ alias: “Veritas Ecomobile” initial_state: ‘on’ trigger:
    • platform: event event_type: garbage_collection_loaded event_data: entity_id: sensor.veritas_ecomobile action:
    • variables: include: |- 2022-01-17 2022-02-21 2022-03-21 2022-04-30 2022-05-16 2022-06-20 2022-07-18 2022-08-30 2022-09-19 2022-10-17 2022-11-21 2022-12-19
    • repeat: count: |- {{ include.split(‘\n’) | count }} sequence: - service: garbage_collection.add_date data: entity_id: “{{ trigger.event.data.entity_id }}” date: |- {{ include.split(‘\n’)[repeat.index-1] }}
    • service: garbage_collection.update_state data: entity_id: “{{ trigger.event.data.entity_id }}”

Configuration

{
  "home_assistant": {
    "installation_type": "Home Assistant Core",
    "version": "2022.4.5",
    "dev": false,
    "hassio": false,
    "virtualenv": true,
    "python_version": "3.9.11",
    "docker": false,
    "arch": "aarch64",
    "timezone": "Europe/Rome",
    "os_name": "Linux",
    "os_version": "5.15.32-v8+",
    "run_as_root": false
  },
  "custom_components": {
    "garbage_collection": {
      "version": "4.6",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    },
    "authenticated": {
      "version": "0.0.0",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "garbage_collection",
    "name": "Garbage Collection",
    "version": "4.6",
    "documentation": "https://github.com/bruxy70/Garbage-Collection/",
    "issue_tracker": "https://github.com/bruxy70/Garbage-Collection/issues",
    "iot_class": "calculated",
    "dependencies": [],
    "config_flow": true,
    "codeowners": [
      "@bruxy70"
    ],
    "requirements": [
      "python-dateutil>=2.8.2"
    ],
    "is_built_in": false
  },
  "data": {
    "entity_id": "sensor.veritas_ecomobile",
    "state": "il 30/04, tra 11 giorni",
    "attributes": {
      "next_date": "2022-04-30T00:00:00+02:00",
      "days": 11,
      "last_collection": null,
      "last_updated": "2022-04-19T10:00:23.800331+02:00",
      "device_class": "garbage_collection__schedule"
    },
    "config_entry": {
      "entry_id": "03dd234b4afe712057fb1311c6ce4c4e",
      "version": 4.5,
      "domain": "garbage_collection",
      "title": "Veritas EcoMobile",
      "data": {
        "unique_id": "bd66e837-8418-47d1-9fec-1b960fd8a1b3",
        "frequency": "blank",
        "icon_normal": "mdi:trash-can",
        "icon_today": "mdi:delete-restore",
        "icon_tomorrow": "mdi:delete-circle",
        "verbose_state": true,
        "manual_update": true,
        "expire_after": "12:00",
        "verbose_format": "il {date}, tra {days} giorni",
        "date_format": "%d/%m"
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    }
  }
}

Debug logs

2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-01-17 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-02-21 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-03-21 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-04-30 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-05-16 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-06-20 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-07-18 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-08-30 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-09-19 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-10-17 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-11-21 not added to Veritas EcoMobile - already on the collection schedule
2022-04-18 00:00:03 ERROR (MainThread) [custom_components.garbage_collection.sensor] 2022-12-19 not added to Veritas EcoMobile - already on the collection schedule

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bruxy70commented, Apr 23, 2022

I can confirm that I did observe the same issue in testing. Looking for the cause…

0reactions
a323870commented, Apr 24, 2022

Confirm, New version of sensor.py resolve the problem. Tanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Collection Schedule Look-up - Refuse & Recycling
Trash and Recycling Holiday Schedule​​ For 2022, the holiday will be observed on Monday, December 26. There will be no collections and the...
Read more >
Collection Calendar - City of Sacramento
Enter your Sacramento street address to find out when your garbage, recycle and yard waste collection occurs.
Read more >
Where can I view my pickup schedule? - Waste Management
From the My WM Dashboard, go to My Services. Pickup Schedule will be displayed, along with the next pickup date, holiday schedule, and...
Read more >
Trash, Recycling, and Compost Collection Schedule · NYC311
The trash, recycling, and compost collection schedule for your home is based on your address. Place your items curbside on the curb between...
Read more >
Collection Schedules | Environmental Services
2022 Holiday Schedule. No collection of City of San Diego trash, recyclables, or yard waste on the following City-observed holidays: Monday, May 30, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found