diff --git a/homeassistant/components/brother/manifest.json b/homeassistant/components/brother/manifest.json index bd5d877b4f3..cba44b68c6a 100644 --- a/homeassistant/components/brother/manifest.json +++ b/homeassistant/components/brother/manifest.json @@ -8,7 +8,7 @@ "iot_class": "local_polling", "loggers": ["brother", "pyasn1", "pysmi", "pysnmp"], "quality_scale": "platinum", - "requirements": ["brother==2.2.0"], + "requirements": ["brother==2.3.0"], "zeroconf": [ { "type": "_printer._tcp.local.", diff --git a/homeassistant/components/snmp/manifest.json b/homeassistant/components/snmp/manifest.json index 8194b3f96ce..324a1e49366 100644 --- a/homeassistant/components/snmp/manifest.json +++ b/homeassistant/components/snmp/manifest.json @@ -5,5 +5,5 @@ "documentation": "https://www.home-assistant.io/integrations/snmp", "iot_class": "local_polling", "loggers": ["pyasn1", "pysmi", "pysnmp"], - "requirements": ["pysnmplib==5.0.20"] + "requirements": ["pysnmplib==5.0.21"] } diff --git a/homeassistant/components/snmp/sensor.py b/homeassistant/components/snmp/sensor.py index c20e5fe6e36..fc8068fb532 100644 --- a/homeassistant/components/snmp/sensor.py +++ b/homeassistant/components/snmp/sensor.py @@ -145,7 +145,7 @@ async def async_setup_platform( ContextData(), ] get_result = await getCmd(*request_args, ObjectType(ObjectIdentity(baseoid))) - errindication, _, _, _ = await get_result + errindication, _, _, _ = get_result if errindication and not accept_errors: _LOGGER.error("Please check the details in the configuration file") @@ -207,7 +207,7 @@ class SnmpData: get_result = await getCmd( *self._request_args, ObjectType(ObjectIdentity(self._baseoid)) ) - errindication, errstatus, errindex, restable = await get_result + errindication, errstatus, errindex, restable = get_result if errindication and not self._accept_errors: _LOGGER.error("SNMP error: %s", errindication) diff --git a/homeassistant/components/snmp/switch.py b/homeassistant/components/snmp/switch.py index 4699aaefd77..d0fe393d550 100644 --- a/homeassistant/components/snmp/switch.py +++ b/homeassistant/components/snmp/switch.py @@ -261,7 +261,7 @@ class SnmpSwitch(SwitchEntity): get_result = await getCmd( *self._request_args, ObjectType(ObjectIdentity(self._baseoid)) ) - errindication, errstatus, errindex, restable = await get_result + errindication, errstatus, errindex, restable = get_result if errindication: _LOGGER.error("SNMP error: %s", errindication) diff --git a/requirements_all.txt b/requirements_all.txt index 000aa752b42..7e6008ce147 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -480,7 +480,7 @@ boto3==1.20.24 broadlink==0.18.3 # homeassistant.components.brother -brother==2.2.0 +brother==2.3.0 # homeassistant.components.brottsplatskartan brottsplatskartan==0.0.1 @@ -1982,7 +1982,7 @@ pysmarty==0.8 pysml==0.0.8 # homeassistant.components.snmp -pysnmplib==5.0.20 +pysnmplib==5.0.21 # homeassistant.components.snooz pysnooz==0.8.3 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index e02ee6a6c3c..d74867edbfe 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -393,7 +393,7 @@ boschshcpy==0.2.35 broadlink==0.18.3 # homeassistant.components.brother -brother==2.2.0 +brother==2.3.0 # homeassistant.components.brunt brunt==1.2.0 @@ -1435,7 +1435,7 @@ pysmartthings==0.7.6 pysml==0.0.8 # homeassistant.components.snmp -pysnmplib==5.0.20 +pysnmplib==5.0.21 # homeassistant.components.snooz pysnooz==0.8.3 diff --git a/tests/components/snmp/test_sensor.py b/tests/components/snmp/test_sensor.py index b15cc4bfa61..d6637946da8 100644 --- a/tests/components/snmp/test_sensor.py +++ b/tests/components/snmp/test_sensor.py @@ -1,6 +1,5 @@ """SNMP sensor tests.""" -import asyncio from unittest.mock import MagicMock, Mock, patch import pytest @@ -16,11 +15,9 @@ def hlapi_mock(): """Mock out 3rd party API.""" mock_data = MagicMock() mock_data.prettyPrint = Mock(return_value="13.5") - future = asyncio.get_event_loop().create_future() - future.set_result((None, None, None, [[mock_data]])) with patch( "homeassistant.components.snmp.sensor.getCmd", - return_value=future, + return_value=(None, None, None, [[mock_data]]), ): yield