* Use `None` for unknown states consistently
* Use huawei_lte_api NetworkModeEnum instead of magic strings
* Recognize some new sensor items
* Exclude current day duration sensor
* Fix current month upload/download types
* Add current day transfer
* Extract lambdas used in multiple spots to named functions
* Formatter naming consistency improvements
Key routers in hass.data by config entry rather than unique id
There's no particular reason to key them by the unique id; the config
entry id is a stronger, always available guarantee, and a much more
common convention across the HA codebase.
At some point, we might conceivably support devices we can't find a
proper unique id for; this would work for that purpose as well.
* Probe Huawei LTE API for device support on SSDP match
More or less as expected, the loosening of SSDP/UPnP data matches done
in #81643 started to yield false positives, as in #85402.
Coming up with robust matches solely based on the SSDP/UPnP data still
does not seem possible, so keep the matches as loose as they were made,
but additionally invoke a probe request on the API to determine if the
device looks like a supported one.
* Probe only after unique id checks
Prevents throwaway probes for discoveries already in progress.
* Fix SSDP result URL test, add missing assert on it
* Recognize more SSDP friendly names as "ours"
* Trigger on SoyeaLink devices
* Pass discovered URL through context, it does not persist via user_input
* Use manufacturer from SSDP
* Actually use serial number if available, update URL for configured
* Remove heuristic friendly name filtering against non-LTE devices
* Refactor Huawei LTE to use Entity Description
* Apply suggestions from code review
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>