Repository: mampfes/hacs_waste_collection_schedule

Issue:
Abfall.IO / AbfallPlus.de - many warnings in HA log
Hello,

I have setup the configuration to collect the data from AWB Limburg-Weilburg via the provided Abfall.IO / AbfallPlus.de.
Additionally I have configured sensors - the sensors for different waste types receive the data correctly.

_waste_collection_schedule:
  sources:
    - name: abfall_io
      args:
        key: 0ff491ffdf614d6f34870659c0c8d917
        f_id_kommune: 6031
        f_id_bezirk: 16
        f_id_strasse: -removed-
        f_id_strasse_hnr: -removed-
      customize:
        - type: Altpapier
          icon: mdi:delete
        - type: Bioabfall
          icon: mdi:delete
        - type: Gelber Sack
          icon: mdi:delete
        - type: Restabfall
          icon: mdi:delete_


Everything seems to work fine - but I have many warning i in the HA log.
Do you have an idea why I have these warnings and how to prevent them.

2022-11-28 19:59:18.060 WARNING (SyncWorker_8) [waste_collection_schedule.source.abfall_io] Html tags removed from ics file: <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__global/__autoload/awk_global_termine.class.php</b> on line <b>451</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1983 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Notice</b>:  Undefined index: id1984 in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>105</b><br />, <br />, <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /kunden/490784_78549/__global/__autoload/awk_global_termine.class.php:451) in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>194</b><br />, <br />, <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /kunden/490784_78549/__global/__autoload/awk_global_termine.class.php:451) in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>195</b><br />, <br />, <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /kunden/490784_78549/__global/__autoload/awk_global_termine.class.php:451) in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>196</b><br />, <br />, <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /kunden/490784_78549/__global/__autoload/awk_global_termine.class.php:451) in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>197</b><br />, <br />, <b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /kunden/490784_78549/__global/__autoload/awk_global_termine.class.php:451) in <b>/kunden/490784_78549/__api/widgets/publisher/canvas/scripts/export_ics.inc.php</b> on line <b>203</b><br />



Discussion:
Known issue - solution: https://github.com/mampfes/hacs_waste_collection_schedule/issues/390#issuecomment-1302341046


Resolving patch:
diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfall_io.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfall_io.py
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfall_io.py
+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfall_io.py
@@ -50,11 +50,12 @@
         "f_id_kommune": "2911",
         "f_id_strasse": "2374",
     },
-    "Thalheim": {
+    "AWB Limburg-Weilburg": {
         "key": "0ff491ffdf614d6f34870659c0c8d917",
         "f_id_kommune": 6031,
         "f_id_strasse": 621,
         "f_id_strasse_hnr": 872,
+        "f_abfallarten": [27, 28, 17, 67],
     }
 }
 _LOGGER = logging.getLogger(__name__)
@@ -142,10 +143,15 @@ def fetch(self):
         ics_file = r.text
 
         # Remove all lines starting with <b
+        # This warning are caused for customers which use an extra radiobutton
+        # list to add special waste types:
+        # - AWB Limburg-Weilheim uses this list to select a "Sonderabfall <city>"
+        #   waste type. The warning could be removed by adding the extra config
+        #   option "f_abfallarten" with the following values [27, 28, 17, 67]
         html_warnings = re.findall("\<b.*",ics_file)
         if html_warnings:
             ics_file = re.sub("\<br.*|\<b.*", "\\r", ics_file)
-            _LOGGER.warning("Html tags removed from ics file: " + ', '.join(html_warnings))
+            #_LOGGER.warning("Html tags removed from ics file: " + ', '.join(html_warnings))
 
         dates = self._ics.convert(ics_file)
 


Test patch: