Closed brodock closed 10 months ago
Did you try the print waste types option this sensor has? Because all fractions should be supported
@pippyn Thanks, it seems the combined is being handled as GFT
Available waste types: gft, papier, pmd, restafval
It seems they are going to replace the combined GFT and Restafval by separate ones in 2024... this are the items I see in the almere afvalkalendar
I couldn't find in the code where it is handling the "GREENGREY" as "GREEN", perhaps its doing a partial match?
I think this is the case indeed:
def map_waste_type(self, name):
for from_type, to_type in self.WASTE_TYPE_MAPPING.items():
if from_type.lower() in name.lower():
return to_type
return name.lower()
I've tried to add the GREENGREY here:
class XimmioCollector(WasteCollector):
WASTE_TYPE_MAPPING = {
'BRANCHES': WASTE_TYPE_BRANCHES,
'BULKLITTER': WASTE_TYPE_BULKLITTER,
'BULKYGARDENWASTE': WASTE_TYPE_BULKYGARDENWASTE,
'GLASS': WASTE_TYPE_GLASS,
'GREEN': WASTE_TYPE_GREEN,
'GREENGREY': WASTE_TYPE_GREENGREY,
'GREY': WASTE_TYPE_GREY,
'KCA': WASTE_TYPE_KCA,
'PLASTIC': WASTE_TYPE_PACKAGES,
'PACKAGES': WASTE_TYPE_PACKAGES,
'PAPER': WASTE_TYPE_PAPER,
'REMAINDER': WASTE_TYPE_REMAINDER,
'TEXTILE': WASTE_TYPE_TEXTILE,
'TREE': WASTE_TYPE_TREE,
}
and it still flags it as GFT
Considering all the waste types:
WASTE_TYPE_BRANCHES = 'takken'
WASTE_TYPE_BULKLITTER = 'grofvuil'
WASTE_TYPE_GLASS = 'glas'
WASTE_TYPE_GREEN = 'gft'
WASTE_TYPE_GREENGREY = 'duobak'
WASTE_TYPE_GREY = 'restafval'
WASTE_TYPE_GREY_BAGS = 'restafvalzakken'
WASTE_TYPE_SORTI = 'sortibak'
WASTE_TYPE_KCA = 'chemisch'
WASTE_TYPE_KCA_LOCATION = 'chemisch-brengen'
WASTE_TYPE_MILIEUB = 'milieuboer'
WASTE_TYPE_PAPER_PMD = 'papier-pmd'
WASTE_TYPE_PMD_GREY = 'pmd-restafval'
WASTE_TYPE_PACKAGES = 'pmd'
WASTE_TYPE_PAPER = 'papier'
WASTE_TYPE_PLASTIC = 'plastic'
WASTE_TYPE_SOFT_PLASTIC = 'zacht-plastic'
WASTE_TYPE_REMAINDER = 'restwagen'
WASTE_TYPE_TEXTILE = 'textiel'
WASTE_TYPE_TREE = 'kerstbomen'
WASTE_TYPE_BULKYGARDENWASTE = 'tuinafval'
I think those are the ones that will not work when using in
to compare:
WASTE_TYPE_GREEN = 'gft'
WASTE_TYPE_GREENGREY = 'duobak' # this will never match because `WASTE_TYPE_GREEN` matches first
WASTE_TYPE_GREY = 'restafval'
WASTE_TYPE_GREY_BAGS = 'restafvalzakken' # this will never match because `WASTE_TYPE_GREY` matches first
as long as they are in the "wrong order" they will fail
This will be included in the next release
Almere uses the ximmio provider. See the snippet from the GetCalendar response below:
This is currently not supported.