Fix handling of `NoneType` for torrents in `count_torrents_in_states` function Added a check to handle cases where the 'torrents' data is None, avoiding a `TypeError` when attempting to get the length of a `NoneType` object. The function now returns 0 if 'torrents' is None, ensuring robust behavior when no torrent data is available. |
||
---|---|---|
.. | ||
__init__.py | ||
config_flow.py | ||
const.py | ||
coordinator.py | ||
helpers.py | ||
icons.json | ||
manifest.json | ||
sensor.py | ||
services.yaml | ||
strings.json | ||
switch.py |