Skip to content

Commit

Permalink
Bug fixes for #235
Browse files Browse the repository at this point in the history
  • Loading branch information
ha0y committed Sep 7, 2021
1 parent 3ffb59e commit 2644a47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions custom_components/xiaomi_miot_raw/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ async def async_set_cover_position(self, **kwargs):
def _handle_platform_specific_attrs(self):
super()._handle_platform_specific_attrs()
self._current_position = self._state_attrs.get(self._did_prefix + 'current_position')
if 'value_range' in self._ctrl_params['current_position'] and self._current_position is not None:
self._current_position = self.convert_value(self._current_position,"current_position",False,self._ctrl_params['current_position']['value_range'])
if 'current_position' in self._ctrl_params:
if 'value_range' in self._ctrl_params['current_position'] and self._current_position is not None:
self._current_position = self.convert_value(self._current_position,"current_position",False,self._ctrl_params['current_position']['value_range'])
if self.is_closing or self.is_opening:
self.async_update = self._throttle1
else:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miot_raw/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"codeowners": [
"@ha0y"
],
"version": "v1.2.4"
"version": "v1.2.5"
}

0 comments on commit 2644a47

Please sign in to comment.