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

Bump aioswitcher to 3.4.1 #107730

Merged
merged 11 commits into from
Jan 10, 2024
8 changes: 7 additions & 1 deletion homeassistant/components/switcher_kis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ def on_device_data_callback(device: SwitcherBase) -> None:

# New device - create device
_LOGGER.info(
"Discovered Switcher device - id: %s, name: %s, type: %s (%s)",
"Discovered Switcher device - id: %s, key: %s, name: %s, type: %s (%s)",
device.device_id,
device.device_key,
device.name,
device.device_type.value,
device.device_type.hex_rep,
Expand Down Expand Up @@ -157,6 +158,11 @@ def device_id(self) -> str:
"""Switcher device id."""
return self.data.device_id # type: ignore[no-any-return]

@property
def device_key(self) -> str:
"""Switcher device key."""
return self.data.device_key # type: ignore[no-any-return]

thecode marked this conversation as resolved.
Show resolved Hide resolved
@property
def mac_address(self) -> str:
"""Switcher device mac address."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switcher_kis/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def async_press(self) -> None:

try:
async with SwitcherType2Api(
self.coordinator.data.ip_address, self.coordinator.data.device_id
self.coordinator.data.ip_address, self.coordinator.data.device_id, self.coordinator.data.device_key
) as swapi:
response = await self.entity_description.press_fn(swapi, self._remote)
except (asyncio.TimeoutError, OSError, RuntimeError) as err:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switcher_kis/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def _async_control_breeze_device(self, **kwargs: Any) -> None:

try:
async with SwitcherType2Api(
self.coordinator.data.ip_address, self.coordinator.data.device_id
self.coordinator.data.ip_address, self.coordinator.data.device_id, self.coordinator.data.device_key
) as swapi:
response = await swapi.control_breeze_device(self._remote, **kwargs)
except (asyncio.TimeoutError, OSError, RuntimeError) as err:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switcher_kis/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def _async_call_api(self, api: str, *args: Any) -> None:

try:
async with SwitcherType2Api(
self.coordinator.data.ip_address, self.coordinator.data.device_id
self.coordinator.data.ip_address, self.coordinator.data.device_id, self.coordinator.data.device_key
) as swapi:
response = await getattr(swapi, api)(*args)
except (asyncio.TimeoutError, OSError, RuntimeError) as err:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switcher_kis/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from .const import DATA_DEVICE, DOMAIN

TO_REDACT = {"device_id", "ip_address", "mac_address"}
TO_REDACT = {"device_id", "device_key", "ip_address", "mac_address"}


async def async_get_config_entry_diagnostics(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switcher_kis/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "local_push",
"loggers": ["aioswitcher"],
"quality_scale": "platinum",
"requirements": ["aioswitcher==3.3.0"]
"requirements": ["aioswitcher==3.4.1"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/switcher_kis/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async def _async_call_api(self, api: str, *args: Any) -> None:

try:
async with SwitcherType1Api(
self.coordinator.data.ip_address, self.coordinator.data.device_id
self.coordinator.data.ip_address, self.coordinator.data.device_id, self.coordinator.data.device_key
) as swapi:
response = await getattr(swapi, api)(*args)
except (asyncio.TimeoutError, OSError, RuntimeError) as err:
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ aioslimproto==2.3.3
aiosteamist==0.3.2

# homeassistant.components.switcher_kis
aioswitcher==3.3.0
aioswitcher==3.4.1

# homeassistant.components.syncthing
aiosyncthing==0.5.1
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ aioslimproto==2.3.3
aiosteamist==0.3.2

# homeassistant.components.switcher_kis
aioswitcher==3.3.0
aioswitcher==3.4.1

# homeassistant.components.syncthing
aiosyncthing==0.5.1
Expand Down
Loading