pippyn/Home-Assistant-Sensor-Afvalbeheer

No icons, only default HA ones

Opened this issue · 7 comments

Hi,

Please keep in mind that I'm a HA noob :) I don't really know if it's an issue or simply a mistake from my side.
I'm currently migrating from Domoticz to HA and I found your repo. I'm adding it to my HA installation for use with ILVA waste collector (Oost-Vlaanderen, Belgium).

I made a std config and the dates are beeing collected and are correct for my location.
However, in HA, I don't see any of the icons that are available, or which I can see on the thread in the HA forums. The only ones I see are the default HA ones.

2nd, how can I get consistency in the dates? Some are showing the day before the date, other ones only the date.

Naamloos

my cfg:
configuration.yaml

# Afvalbeheer
  - platform: afvalbeheer
    wastecollector: RecycleApp
    resources:
    - GFT
    - Papier
    - PMD
    - Restafval
    - Glas
    dutch: 1
    postcode: 9420
    streetnumber: XX
    streetname: XXXXXXXXX
    upcomingsensor: 1
    builtiniconsnew: 1
    dateformat: '%d-%m-%Y'

card:

type: custom:auto-entities
card:
  type: entities
  title: Afvalkalender
  state_color: false
  show_header_toggle: false
entities:
  - sensor.recycleapp_pmd
  - sensor.recycleapp_papier
  - sensor.recycleapp_glas
  - sensor.recycleapp_restafval
  - sensor.recycleapp_gft
sort:
  method: entity_id
  attribute: Sort-date
  reverse: true
  numeric: false

Thanks !

HI @StarWing01 , welcome to HA.

Sure, just add these 2 lines to your config:

dayofweek: 0
builtinicons: 1

BTW you are using the old way to implement the sensor. Use the new way to get calendar support.
Remove your config from your sensor: section and add it as a platform. It should look somewhat like this:

# Afvalbeheer
afvalbeheer:
  - wastecollector: RecycleApp
    resources:
    - GFT
    - Papier
    - PMD
    - Restafval
    - Glas
    dutch: 1
    postcode: 9420
    streetnumber: XX
    streetname: XXXXXXXXX
    upcomingsensor: 1
    builtiniconsnew: 1
    dateformat: '%d-%m-%Y'
    dayofweek: 0
    builtinicons: 1

I have no clue what you mean with your last post about platform :) But I'll google it.
I've changed my configuration.yaml file according to your suggestion.
This solved the date issue, but still no icons :/

To be complete, I have installed through HACS, not manually, and applied the lastest update (v5.3.6).

That is a bug.
But it should be fixed in v5.3.7

Icons fixed after last update.
Remains: sorting by date.

You can do that with a custom card. I use auto-entities, example:

card:
  show_header_toggle: false
  title: Afvalbeheer
  type: entities
filter:
  exclude:
    - state: unknown
  include:
    - entity_id: sensor.gft
    - entity_id: sensor.gftgratis
    - entity_id: sensor.papier
    - entity_id: sensor.pmd
    - entity_id: sensor.restafval
sort:
  method: attribute
  attribute: Sort_date
  reverse: false
type: custom:auto-entities

Fixed !

Latest card code:

type: custom:auto-entities
card:
  type: entities
  title: Afvalkalender
  state_color: false
  show_header_toggle: false
entities:
  - sensor.recycleapp_pmd
  - sensor.recycleapp_papier
  - sensor.recycleapp_glas
  - sensor.recycleapp_restafval
  - sensor.recycleapp_gft
sort:
  method: attribute
  attribute: Sort_date
  reverse: false
filter:
  exclude:
    - state: unknown