Skip to content

Commit

Permalink
Merge pull request #269 from sti0/bugfix/await-coroutine
Browse files Browse the repository at this point in the history
Fix await coroutine for numbers and selects
  • Loading branch information
pail23 committed Jun 28, 2024
2 parents 576a763 + f38b0b2 commit 7751e4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/stiebel_eltron_isg/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def unique_id(self) -> str | None:

async def async_set_native_value(self, value: float) -> None:
"""Set new value."""
self.coordinator.set_data(self.entity_description.key, value)
await self.coordinator.set_data(self.entity_description.key, value)

@property
def native_value(self):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/stiebel_eltron_isg/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def current_option(self):
async def async_select_option(self, option: str) -> None:
"""Update the current selected option."""
key = get_key_from_value(self._options, option)
self.coordinator.set_data(self.entity_description.key, key)
await self.coordinator.set_data(self.entity_description.key, key)

@property
def available(self) -> bool:
Expand Down

0 comments on commit 7751e4d

Please sign in to comment.