Skip to content

Commit

Permalink
Fix for Model not being return in some cases
Browse files Browse the repository at this point in the history
#39 fix by checking if model is supported yes or no in features call
  • Loading branch information
galletn authored Oct 27, 2024
1 parent 0512b91 commit 2de47c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/iaqualink_robots/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,11 @@ async def async_update(self):
url = URL_GET_DEVICE_FEATURES + self._serial_number + "/features"
data = await asyncio.wait_for(self.get_device_features(url), timeout=30)

self._model = data['model']
self._attributes['model'] = self._model
try:
self._model = data['model']
self._attributes['model'] = self._model
except:
self._model = 'Not Supported' #39 some models do not return a model number on the features call


async def send_login(self, data, headers):
Expand Down

0 comments on commit 2de47c8

Please sign in to comment.