diff --git a/homeassistant/components/homematicip_cloud/hap.py b/homeassistant/components/homematicip_cloud/hap.py index 4acace4a8b1ade..64721c0a96c5b2 100644 --- a/homeassistant/components/homematicip_cloud/hap.py +++ b/homeassistant/components/homematicip_cloud/hap.py @@ -39,8 +39,7 @@ async def async_checkbutton(self): from homematicip.base.base_connection import HmipConnectionError try: - await self.auth.isRequestAcknowledged() - return True + return await self.auth.isRequestAcknowledged() except HmipConnectionError: return False diff --git a/tests/components/homematicip_cloud/test_hap.py b/tests/components/homematicip_cloud/test_hap.py index c39e7d4e26bd0c..61ca3300d601ba 100644 --- a/tests/components/homematicip_cloud/test_hap.py +++ b/tests/components/homematicip_cloud/test_hap.py @@ -44,7 +44,7 @@ async def test_auth_auth_check_and_register(hass): hap = hmipc.HomematicipAuth(hass, config) hap.auth = Mock() with patch.object(hap.auth, 'isRequestAcknowledged', - return_value=mock_coro()), \ + return_value=mock_coro(True)), \ patch.object(hap.auth, 'requestAuthToken', return_value=mock_coro('ABC')), \ patch.object(hap.auth, 'confirmAuthToken',