mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Bump python-kasa to 0.10.0 (#136586)
Bump python-kasa to 0.10.0 Release notes: https://github.com/python-kasa/python-kasa/releases/tag/0.10.0
This commit is contained in:
parent
40127a5ca4
commit
7133eec185
@ -300,5 +300,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/tplink",
|
"documentation": "https://www.home-assistant.io/integrations/tplink",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["kasa"],
|
"loggers": ["kasa"],
|
||||||
"requirements": ["python-kasa[speedups]==0.9.1"]
|
"requirements": ["python-kasa[speedups]==0.10.0"]
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ from dataclasses import dataclass
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from kasa import Device, Module
|
from kasa import Device, Module
|
||||||
from kasa.smart.modules.alarm import Alarm
|
|
||||||
|
|
||||||
from homeassistant.components.siren import (
|
from homeassistant.components.siren import (
|
||||||
DOMAIN as SIREN_DOMAIN,
|
DOMAIN as SIREN_DOMAIN,
|
||||||
@ -101,7 +100,7 @@ class TPLinkSirenEntity(CoordinatedTPLinkModuleEntity, SirenEntity):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the siren entity."""
|
"""Initialize the siren entity."""
|
||||||
super().__init__(device, coordinator, description, parent=parent)
|
super().__init__(device, coordinator, description, parent=parent)
|
||||||
self._alarm_module: Alarm = device.modules[Module.Alarm]
|
self._alarm_module = device.modules[Module.Alarm]
|
||||||
|
|
||||||
@async_refresh_after
|
@async_refresh_after
|
||||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -2396,7 +2396,7 @@ python-join-api==0.0.9
|
|||||||
python-juicenet==1.1.0
|
python-juicenet==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.tplink
|
# homeassistant.components.tplink
|
||||||
python-kasa[speedups]==0.9.1
|
python-kasa[speedups]==0.10.0
|
||||||
|
|
||||||
# homeassistant.components.linkplay
|
# homeassistant.components.linkplay
|
||||||
python-linkplay==0.1.3
|
python-linkplay==0.1.3
|
||||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -1935,7 +1935,7 @@ python-izone==1.2.9
|
|||||||
python-juicenet==1.1.0
|
python-juicenet==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.tplink
|
# homeassistant.components.tplink
|
||||||
python-kasa[speedups]==0.9.1
|
python-kasa[speedups]==0.10.0
|
||||||
|
|
||||||
# homeassistant.components.linkplay
|
# homeassistant.components.linkplay
|
||||||
python-linkplay==0.1.3
|
python-linkplay==0.1.3
|
||||||
|
@ -55,7 +55,6 @@ DEVICE_CONFIG_KLAP = DeviceConfig(
|
|||||||
IP_ADDRESS,
|
IP_ADDRESS,
|
||||||
credentials=CREDENTIALS,
|
credentials=CREDENTIALS,
|
||||||
connection_type=CONN_PARAMS_KLAP,
|
connection_type=CONN_PARAMS_KLAP,
|
||||||
uses_http=True,
|
|
||||||
)
|
)
|
||||||
CONN_PARAMS_AES = DeviceConnectionParameters(
|
CONN_PARAMS_AES = DeviceConnectionParameters(
|
||||||
DeviceFamily.SmartTapoPlug, DeviceEncryptionType.Aes
|
DeviceFamily.SmartTapoPlug, DeviceEncryptionType.Aes
|
||||||
@ -84,7 +83,6 @@ DEVICE_CONFIG_AES = DeviceConfig(
|
|||||||
IP_ADDRESS2,
|
IP_ADDRESS2,
|
||||||
credentials=CREDENTIALS,
|
credentials=CREDENTIALS,
|
||||||
connection_type=CONN_PARAMS_AES,
|
connection_type=CONN_PARAMS_AES,
|
||||||
uses_http=True,
|
|
||||||
aes_keys=AES_KEYS,
|
aes_keys=AES_KEYS,
|
||||||
)
|
)
|
||||||
CONN_PARAMS_AES_CAMERA = DeviceConnectionParameters(
|
CONN_PARAMS_AES_CAMERA = DeviceConnectionParameters(
|
||||||
@ -94,7 +92,6 @@ DEVICE_CONFIG_AES_CAMERA = DeviceConfig(
|
|||||||
IP_ADDRESS3,
|
IP_ADDRESS3,
|
||||||
credentials=CREDENTIALS,
|
credentials=CREDENTIALS,
|
||||||
connection_type=CONN_PARAMS_AES_CAMERA,
|
connection_type=CONN_PARAMS_AES_CAMERA,
|
||||||
uses_http=True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
DEVICE_CONFIG_DICT_KLAP = {
|
DEVICE_CONFIG_DICT_KLAP = {
|
||||||
|
@ -1169,7 +1169,6 @@ async def test_manual_port_override(
|
|||||||
host,
|
host,
|
||||||
credentials=None,
|
credentials=None,
|
||||||
port_override=port,
|
port_override=port,
|
||||||
uses_http=True,
|
|
||||||
connection_type=CONN_PARAMS_KLAP,
|
connection_type=CONN_PARAMS_KLAP,
|
||||||
)
|
)
|
||||||
mock_device = _mocked_device(
|
mock_device = _mocked_device(
|
||||||
@ -1491,7 +1490,6 @@ async def test_integration_discovery_with_ip_change(
|
|||||||
# Check that init set the new host correctly before calling connect
|
# Check that init set the new host correctly before calling connect
|
||||||
assert config.host == IP_ADDRESS
|
assert config.host == IP_ADDRESS
|
||||||
config.host = IP_ADDRESS2
|
config.host = IP_ADDRESS2
|
||||||
config.uses_http = False # Not passed in to new config class
|
|
||||||
config.http_client = "Foo"
|
config.http_client = "Foo"
|
||||||
mock_connect["connect"].assert_awaited_once_with(config=config)
|
mock_connect["connect"].assert_awaited_once_with(config=config)
|
||||||
|
|
||||||
@ -1578,7 +1576,6 @@ async def test_integration_discovery_with_connection_change(
|
|||||||
assert mock_config_entry.state is ConfigEntryState.LOADED
|
assert mock_config_entry.state is ConfigEntryState.LOADED
|
||||||
|
|
||||||
config.host = IP_ADDRESS2
|
config.host = IP_ADDRESS2
|
||||||
config.uses_http = False # Not passed in to new config class
|
|
||||||
config.http_client = "Foo"
|
config.http_client = "Foo"
|
||||||
config.aes_keys = AES_KEYS
|
config.aes_keys = AES_KEYS
|
||||||
mock_connect["connect"].assert_awaited_once_with(config=config)
|
mock_connect["connect"].assert_awaited_once_with(config=config)
|
||||||
@ -1847,7 +1844,6 @@ async def test_reauth_update_with_encryption_change(
|
|||||||
connection_type=Device.ConnectionParameters(
|
connection_type=Device.ConnectionParameters(
|
||||||
Device.Family.SmartTapoPlug, Device.EncryptionType.Klap
|
Device.Family.SmartTapoPlug, Device.EncryptionType.Klap
|
||||||
),
|
),
|
||||||
uses_http=True,
|
|
||||||
)
|
)
|
||||||
mock_device = _mocked_device(
|
mock_device = _mocked_device(
|
||||||
alias="my_device",
|
alias="my_device",
|
||||||
|
@ -246,7 +246,6 @@ async def test_config_entry_with_stored_credentials(
|
|||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
assert mock_config_entry.state is ConfigEntryState.LOADED
|
assert mock_config_entry.state is ConfigEntryState.LOADED
|
||||||
config = DeviceConfig.from_dict(DEVICE_CONFIG_KLAP.to_dict())
|
config = DeviceConfig.from_dict(DEVICE_CONFIG_KLAP.to_dict())
|
||||||
config.uses_http = False
|
|
||||||
config.http_client = "Foo"
|
config.http_client = "Foo"
|
||||||
assert config.credentials != stored_credentials
|
assert config.credentials != stored_credentials
|
||||||
config.credentials = stored_credentials
|
config.credentials = stored_credentials
|
||||||
@ -762,7 +761,6 @@ async def test_credentials_hash_auth_error(
|
|||||||
expected_config = DeviceConfig.from_dict(
|
expected_config = DeviceConfig.from_dict(
|
||||||
{**DEVICE_CONFIG_DICT_KLAP, "credentials_hash": "theHash"}
|
{**DEVICE_CONFIG_DICT_KLAP, "credentials_hash": "theHash"}
|
||||||
)
|
)
|
||||||
expected_config.uses_http = False
|
|
||||||
expected_config.http_client = "Foo"
|
expected_config.http_client = "Foo"
|
||||||
connect_mock.assert_called_with(config=expected_config)
|
connect_mock.assert_called_with(config=expected_config)
|
||||||
assert entry.state is ConfigEntryState.SETUP_ERROR
|
assert entry.state is ConfigEntryState.SETUP_ERROR
|
||||||
@ -794,13 +792,20 @@ async def test_migrate_remove_device_config(
|
|||||||
As async_setup_entry will succeed the hash on the parent is updated
|
As async_setup_entry will succeed the hash on the parent is updated
|
||||||
from the device.
|
from the device.
|
||||||
"""
|
"""
|
||||||
|
old_device_config = {
|
||||||
|
k: v for k, v in device_config.to_dict().items() if k != "credentials"
|
||||||
|
}
|
||||||
|
device_config_dict = {
|
||||||
|
**old_device_config,
|
||||||
|
"uses_http": device_config.connection_type.encryption_type
|
||||||
|
is not Device.EncryptionType.Xor,
|
||||||
|
}
|
||||||
|
|
||||||
OLD_CREATE_ENTRY_DATA = {
|
OLD_CREATE_ENTRY_DATA = {
|
||||||
CONF_HOST: expected_entry_data[CONF_HOST],
|
CONF_HOST: expected_entry_data[CONF_HOST],
|
||||||
CONF_ALIAS: ALIAS,
|
CONF_ALIAS: ALIAS,
|
||||||
CONF_MODEL: MODEL,
|
CONF_MODEL: MODEL,
|
||||||
CONF_DEVICE_CONFIG: {
|
CONF_DEVICE_CONFIG: device_config_dict,
|
||||||
k: v for k, v in device_config.to_dict().items() if k != "credentials"
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = MockConfigEntry(
|
entry = MockConfigEntry(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user