mirror of
https://github.com/home-assistant/core.git
synced 2025-09-12 16:21:35 +02:00
Bump aioesphomeapi to 38.2.1 (#150455)
This commit is contained in:
@@ -564,11 +564,11 @@ class ESPHomeManager:
|
||||
)
|
||||
entry_data.loaded_platforms.add(Platform.ASSIST_SATELLITE)
|
||||
|
||||
cli.subscribe_states(entry_data.async_update_state)
|
||||
cli.subscribe_service_calls(self.async_on_service_call)
|
||||
cli.subscribe_home_assistant_states(
|
||||
self.async_on_state_subscription,
|
||||
self.async_on_state_request,
|
||||
cli.subscribe_home_assistant_states_and_services(
|
||||
on_state=entry_data.async_update_state,
|
||||
on_service_call=self.async_on_service_call,
|
||||
on_state_sub=self.async_on_state_subscription,
|
||||
on_state_request=self.async_on_state_request,
|
||||
)
|
||||
|
||||
entry_data.async_save_to_store()
|
||||
|
@@ -17,7 +17,7 @@
|
||||
"mqtt": ["esphome/discover/#"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": [
|
||||
"aioesphomeapi==37.2.2",
|
||||
"aioesphomeapi==38.2.1",
|
||||
"esphome-dashboard-api==1.3.0",
|
||||
"bleak-esphome==3.1.0"
|
||||
],
|
||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@@ -247,7 +247,7 @@ aioelectricitymaps==0.4.0
|
||||
aioemonitor==1.0.5
|
||||
|
||||
# homeassistant.components.esphome
|
||||
aioesphomeapi==37.2.2
|
||||
aioesphomeapi==38.2.1
|
||||
|
||||
# homeassistant.components.flo
|
||||
aioflo==2021.11.0
|
||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@@ -235,7 +235,7 @@ aioelectricitymaps==0.4.0
|
||||
aioemonitor==1.0.5
|
||||
|
||||
# homeassistant.components.esphome
|
||||
aioesphomeapi==37.2.2
|
||||
aioesphomeapi==38.2.1
|
||||
|
||||
# homeassistant.components.flo
|
||||
aioflo==2021.11.0
|
||||
|
@@ -517,9 +517,27 @@ async def _mock_generic_device_entry(
|
||||
mock_client.list_entities_services = AsyncMock(
|
||||
return_value=mock_list_entities_services
|
||||
)
|
||||
mock_client.subscribe_states = _subscribe_states
|
||||
mock_client.subscribe_service_calls = _subscribe_service_calls
|
||||
mock_client.subscribe_home_assistant_states = _subscribe_home_assistant_states
|
||||
|
||||
def _subscribe_home_assistant_states_and_services(
|
||||
*,
|
||||
on_state: Callable[[EntityState], None],
|
||||
on_service_call: Callable[[HomeassistantServiceCall], None],
|
||||
on_state_sub: Callable[[str, str | None], None],
|
||||
on_state_request: Callable[[str, str | None], None],
|
||||
) -> None:
|
||||
"""Subscribe to states and service calls."""
|
||||
mock_device.set_state_callback(on_state)
|
||||
mock_device.set_service_call_callback(on_service_call)
|
||||
mock_device.set_home_assistant_state_subscription_callback(
|
||||
on_state_sub, on_state_request
|
||||
)
|
||||
# Set the initial states
|
||||
for state in states:
|
||||
on_state(state)
|
||||
|
||||
mock_client.subscribe_home_assistant_states_and_services = (
|
||||
_subscribe_home_assistant_states_and_services
|
||||
)
|
||||
mock_client.subscribe_logs = _subscribe_logs
|
||||
|
||||
try_connect_done = Event()
|
||||
|
@@ -416,10 +416,12 @@ async def test_unique_id_updated_to_mac(
|
||||
entry.add_to_hass(hass)
|
||||
subscribe_done = hass.loop.create_future()
|
||||
|
||||
def async_subscribe_states(*args, **kwargs) -> None:
|
||||
def async_subscribe_home_assistant_states_and_services(*args, **kwargs) -> None:
|
||||
subscribe_done.set_result(None)
|
||||
|
||||
mock_client.subscribe_states = async_subscribe_states
|
||||
mock_client.subscribe_home_assistant_states_and_services = (
|
||||
async_subscribe_home_assistant_states_and_services
|
||||
)
|
||||
mock_client.device_info = AsyncMock(
|
||||
return_value=DeviceInfo(
|
||||
mac_address="1122334455aa",
|
||||
@@ -447,10 +449,12 @@ async def test_add_missing_bluetooth_mac_address(
|
||||
entry.add_to_hass(hass)
|
||||
subscribe_done = hass.loop.create_future()
|
||||
|
||||
def async_subscribe_states(*args, **kwargs) -> None:
|
||||
def async_subscribe_home_assistant_states_and_services(*args, **kwargs) -> None:
|
||||
subscribe_done.set_result(None)
|
||||
|
||||
mock_client.subscribe_states = async_subscribe_states
|
||||
mock_client.subscribe_home_assistant_states_and_services = (
|
||||
async_subscribe_home_assistant_states_and_services
|
||||
)
|
||||
mock_client.device_info = AsyncMock(
|
||||
return_value=DeviceInfo(
|
||||
mac_address="1122334455aa",
|
||||
@@ -587,10 +591,12 @@ async def test_name_updated_only_if_mac_matches(
|
||||
entry.add_to_hass(hass)
|
||||
subscribe_done = hass.loop.create_future()
|
||||
|
||||
def async_subscribe_states(*args, **kwargs) -> None:
|
||||
def async_subscribe_home_assistant_states_and_services(*args, **kwargs) -> None:
|
||||
subscribe_done.set_result(None)
|
||||
|
||||
mock_client.subscribe_states = async_subscribe_states
|
||||
mock_client.subscribe_home_assistant_states_and_services = (
|
||||
async_subscribe_home_assistant_states_and_services
|
||||
)
|
||||
mock_client.device_info = AsyncMock(
|
||||
return_value=DeviceInfo(mac_address="1122334455aa", name="new")
|
||||
)
|
||||
@@ -622,10 +628,12 @@ async def test_name_updated_only_if_mac_was_unset(
|
||||
entry.add_to_hass(hass)
|
||||
subscribe_done = hass.loop.create_future()
|
||||
|
||||
def async_subscribe_states(*args, **kwargs) -> None:
|
||||
def async_subscribe_home_assistant_states_and_services(*args, **kwargs) -> None:
|
||||
subscribe_done.set_result(None)
|
||||
|
||||
mock_client.subscribe_states = async_subscribe_states
|
||||
mock_client.subscribe_home_assistant_states_and_services = (
|
||||
async_subscribe_home_assistant_states_and_services
|
||||
)
|
||||
mock_client.device_info = AsyncMock(
|
||||
return_value=DeviceInfo(mac_address="1122334455aa", name="new")
|
||||
)
|
||||
|
Reference in New Issue
Block a user