Home-Assistant-Sensor-Afvalbeheer icon indicating copy to clipboard operation
Home-Assistant-Sensor-Afvalbeheer copied to clipboard

Deafvalapp api

Open JaySea77 opened this issue 9 months ago • 7 comments

Deadvalapp api verandert de waarde van morgen en vandaag meerdere keren per dag. Doordat dit steeds gebeurt, kun je de waarde hiervan niet meer afvangen. Zo was het eerst 'pmd, gft' en nu ineens 'GFT, PMD'. Vorige week was het 'Restafval, Gft' en enkele uren later 'Restafval, GFT' De volgorde en het hoofdletter gebruik wijzigt steeds.

JaySea77 avatar May 01 '24 18:05 JaySea77

What is your config?

pippyn avatar May 06 '24 08:05 pippyn

afvalbeheer:
  wastecollector: DeAfvalApp
  resources:
    - restafval
    - gft
    - pmd
  postcode: XXXX99 {this is my actual postalcode}
  streetnumber: 99 {this is my actual home number}
  upcomingsensor: 1
  dateformat: "%d-%m-%Y"
  dateonly: 1
  alwaysshowday: 0
  printwastetypes: 0
  dateobject: 0
  name: ""
  nameprefix: 1
  builtinicons: 0
  disableicons: 0
  dutch: 1

JaySea77 avatar May 06 '24 17:05 JaySea77

Change your resources to the capitalization you want to make it consistent. I would recommend this:

afvalbeheer:
  wastecollector: DeAfvalApp
  resources:
    - Restafval
    - GFT
    - PMD
  postcode: XXXX99 {this is my actual postalcode}
  streetnumber: 99 {this is my actual home number}
  upcomingsensor: 1
  dateformat: "%d-%m-%Y"
  dateonly: 1
  alwaysshowday: 0
  printwastetypes: 0
  dateobject: 0
  name: ""
  nameprefix: 1
  builtinicons: 0
  disableicons: 0
  dutch: 1

Warming: This could change the unique entity id's in some cases

pippyn avatar May 14 '24 07:05 pippyn

Would this prevent GFT showing up as gft. Might it be better to change Restafval to RESTAFVAL then too?

JaySea77 avatar May 14 '24 17:05 JaySea77

Yes GFT will be displayed correctly and no; capitalize the fractions as you would write them

pippyn avatar May 14 '24 18:05 pippyn

But having gft changed to GFT. If I set it to Restafval, it might change to RESTAFVAL by the api and break it again.

JaySea77 avatar May 16 '24 14:05 JaySea77

No it won't. The API doesn't capitalize any fractions. The sensor does.

pippyn avatar May 16 '24 14:05 pippyn

That is weird since I didn't change gft to GFT and the sensor.status became GFT which broke my dashboard view.

JaySea77 avatar May 24 '24 14:05 JaySea77

Because the sensor does capitalize the fractions in places it can.

pippyn avatar May 27 '24 06:05 pippyn

But I am sure it is something new because it didn’t always do that.

JaySea77 avatar May 27 '24 06:05 JaySea77

Yes version v5.3.1

pippyn avatar May 27 '24 06:05 pippyn

That explains it :)

JaySea77 avatar May 27 '24 06:05 JaySea77