Repository: mampfes/hacs_waste_collection_schedule

Issue:
Useless Request of a streetlist from muellmax.de
### I Have A Problem With:

A specific source

### What's Your Problem

We are the developers of müllmax. We can accept automated daily ical-requests, currently more than 500 a day. But it is annoying, when useless dataload is produced. To select a street name, an empty formfield mm_frm_str_name is sent, which is the request for a complete list of streetnames. This can cause a dataload of 100.000 kb or more and is comletely useless. Instead of an empty field the requested streetname should be submitted. The second call with the requested streetname in formfield mm_frm_str_sel is unnecessary and should be omitted.

### Source (if relevant)

muellmax_de.py 

### Logs

```Shell
if self._mm_frm_str_sel is not None:
            # show street selection page
            args = {
                "mm_ses": mm_ses.value,
                "xxx": 1,
                "mm_frm_str_name": "",
                "mm_aus_str_txt_submit": "suchen",
            }
            r = requests.post(url, data=args)
            mm_ses.feed(r.text)

            # select street
            args = {
                "mm_ses": mm_ses.value,
                "xxx": 1,
                "mm_frm_str_sel": self._mm_frm_str_sel,
                "mm_aus_str_sel_submit": "weiter",
            }
            r = requests.post(url, data=args)
            mm_ses.feed(r.text)
```


### Relevant Configuration

```YAML
We do not have hacs_waste_collection_schedule installed.
```


### Checklist Source Error

- [X] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
- [X] Checked that the website of your service provider is still working
- [X] Tested my attributes on the service provider website (if possible)
- [X] I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)

### Checklist Sensor Error

- [X] Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)

### Required

- [X] I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
- [X] I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.


Discussion:

Resolving patch:
diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/muellmax_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/muellmax_de.py
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/muellmax_de.py
+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/muellmax_de.py
@@ -96,22 +96,12 @@ def fetch(self):
             mm_ses.feed(r.text)
 
         if self._mm_frm_str_sel is not None:
-            # show street selection page
-            args = {
-                "mm_ses": mm_ses.value,
-                "xxx": 1,
-                "mm_frm_str_name": "",
-                "mm_aus_str_txt_submit": "suchen",
-            }
-            r = requests.post(url, data=args)
-            mm_ses.feed(r.text)
-
             # select street
             args = {
                 "mm_ses": mm_ses.value,
                 "xxx": 1,
                 "mm_frm_str_sel": self._mm_frm_str_sel,
-                "mm_aus_str_sel_submit": "weiter",
+                "mm_aus_str_sel_submit": "suchen",
             }
             r = requests.post(url, data=args)
             mm_ses.feed(r.text)


Test patch: