[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove screenlogic from mypy ignore list #64512

Merged
merged 4 commits into from
Jan 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust coordinator cast
  • Loading branch information
epenet committed Jan 20, 2022
commit 107bbfc4d64ad508e2adde4c8382da237382bd7c
8 changes: 4 additions & 4 deletions homeassistant/components/screenlogic/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ async def async_set_value(self, value: float) -> None:
"""Update the current value."""
# Need to set both levels at the same time, so we gather
# both existing level values and override the one that changed.
coordinator = cast(ScreenlogicDataUpdateCoordinator, self.coordinator)

levels = {}
for level in SUPPORTED_SCG_NUMBERS:
levels[level] = self.coordinator.data[SL_DATA.KEY_SCG][level]["value"]
levels[level] = coordinator.data[SL_DATA.KEY_SCG][level]["value"]
levels[self._data_key] = int(value)

if await cast(
ScreenlogicDataUpdateCoordinator, self.coordinator
).gateway.async_set_scg_config(
if await coordinator.gateway.async_set_scg_config(
levels[SUPPORTED_SCG_NUMBERS[BODY_TYPE.POOL]],
levels[SUPPORTED_SCG_NUMBERS[BODY_TYPE.SPA]],
):
Expand Down