Fix intesishome passing coroutine to HassJob (#43837)

* Update climate.py

Not allowed to pass coroutines to hassjob.

* Update climate.py

* Lint

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
pull/38385/head^2
tehbrd 2020-12-03 10:58:10 +10:00 committed by GitHub
parent 8e6108b9e1
commit 4c7e17c5c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -374,9 +374,11 @@ class IntesisAC(ClimateEntity):
reconnect_minutes,
)
# Schedule reconnection
async_call_later(
self.hass, reconnect_minutes * 60, self._controller.connect()
)
async def try_connect(_now):
await self._controller.connect()
async_call_later(self.hass, reconnect_minutes * 60, try_connect)
if self._controller.is_connected and not self._connected:
# Connection has been restored