File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
custom_components/nefiteasy Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 13
13
from homeassistant .core import HomeAssistant
14
14
from homeassistant .exceptions import ConfigEntryNotReady
15
15
from homeassistant .helpers .update_coordinator import DataUpdateCoordinator , UpdateFailed
16
+ import slixmpp
16
17
17
18
from .const import (
18
19
CONF_ACCESSKEY ,
@@ -145,7 +146,11 @@ async def connect(self) -> None:
145
146
self .connected_state = STATE_CONNECTED
146
147
147
148
if self .connected_state == STATE_CONNECTED :
148
- self .nefit .get ("/gateway/brandID" )
149
+ try :
150
+ self .nefit .get ("/gateway/brandID" )
151
+ except slixmpp .xmlstream .xmlstream .NotConnectedError :
152
+ self .connected_state == STATE_INIT
153
+ return
149
154
try :
150
155
await asyncio .wait_for (
151
156
self .nefit .xmppclient .message_event .wait (), timeout = 29.0
You can’t perform that action at this time.
0 commit comments