bruxy70 / Garbage-Collection

🗑 Custom Home Assistant sensor for scheduling garbage collection (or other regularly re-occurring events - weekly on given days, semi-weekly or monthly)
MIT License
383 stars 90 forks source link

Icon colour has stopped changing even though state is correct #445

Closed Scoff123 closed 1 year ago

Scoff123 commented 1 year ago

Before you submit a new bug report, please check that

Describe the bug

I have been using this for some time now and it has been working very well indeed. The custom garbage collection card has been working correctly and showed the changing icon colours for teh day before and day of collection last week, however today (collection due tomorrow) the icon colour is no longer changing and remains the regular green colour set in 'icon_color' within the card. Only things that I am aware have changed since it worked correctly last week are a HA Core update which i ran yesterday and the latest HA OS update today which I installed.

Looking at the state of my recycling sensor in Dev Tools, correctly shows a state of '1' and an attribute of 'next_date: 2022-12-14T00:00:00+00:00' which is correct for tomorrow. My card config hasn't changed:

type: custom:garbage-collection-card
entity: sensor.recycling
icon_color: green
icon_size: 35px
due_color: red
due_text: true
hide_on_click: false

I've also just noticed that the attricute 'last collection' shows 7th June this year? Shouldn't that be showing the date last wednesday?

image

Configuration

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.12.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "5.15.80",
    "supervisor": "2022.11.2",
    "host_os": "Home Assistant OS 9.4",
    "docker_version": "20.10.19",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "hildebrandglow_dcc": {
      "version": "0.6.0",
      "requirements": []
    },
    "garbage_collection": {
      "version": "4.10.1",
      "requirements": [
        "python-dateutil>=2.8.2"
      ]
    },
    "wiser": {
      "version": "3.2.2",
      "requirements": [
        "aioWiserHeatAPI==0.1.8"
      ]
    },
    "hacs": {
      "version": "1.28.4",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "sun2": {
      "version": "2.1.3",
      "requirements": []
    },
    "fullykiosk": {
      "version": "1.1.0",
      "requirements": [
        "python-fullykiosk==0.0.11"
      ]
    },
    "holidays": {
      "version": "1.9.0",
      "requirements": [
        "python-dateutil>=2.8.2",
        "holidays>=0.14.2"
      ]
    },
    "browser_mod": {
      "version": "2.1.2",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "garbage_collection",
    "name": "Garbage Collection",
    "version": "4.10.1",
    "documentation": "https://github.com/bruxy70/Garbage-Collection/",
    "issue_tracker": "https://github.com/bruxy70/Garbage-Collection/issues",
    "iot_class": "calculated",
    "integration_type": "helper",
    "dependencies": [],
    "config_flow": true,
    "codeowners": [
      "@bruxy70"
    ],
    "requirements": [
      "python-dateutil>=2.8.2"
    ],
    "is_built_in": false
  },
  "data": {
    "entity_id": "sensor.recycling",
    "state": 1,
    "attributes": {
      "days": 1,
      "last_collection": "2022-06-07T21:30:32.885763+01:00",
      "last_updated": "2022-12-13T17:37:12.295098+00:00",
      "next_date": "2022-12-14T00:00:00+00:00",
      "device_class": "garbage_collection__schedule"
    },
    "config_entry": {
      "entry_id": "fe47b40ed9b82760c8be08f61552bf74",
      "version": 6,
      "domain": "garbage_collection",
      "title": "Recycling",
      "data": {
        "unique_id": "d03385be-6587-458f-9304-cbd6c3ec65d1"
      },
      "options": {
        "frequency": "weekly",
        "icon_normal": "mdi:recycle",
        "icon_today": "mdi:recycle",
        "icon_tomorrow": "mdi:recycle",
        "manual_update": false,
        "verbose_state": false,
        "first_month": "jan",
        "last_month": "dec",
        "collection_days": [
          "wed"
        ],
        "verbose_format": "on {date}, in {days} days",
        "date_format": "%d-%b-%Y",
        "hidden": false
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    }
  }
}

Debug logs

No error message
bruxy70 commented 1 year ago

Please check that with the custom card repository. The integration does not do any colors.