From 72f342aa5bcc415069e28f4a44e2f7ac0c7855ab Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 12 May 2021 15:21:54 +0200 Subject: [PATCH] Upgrade aioesphomeapi to 2.7.0 (#50522) --- homeassistant/components/esphome/__init__.py | 8 +++++--- homeassistant/components/esphome/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/esphome/__init__.py b/homeassistant/components/esphome/__init__.py index e62cb995b98..7d87c6bc736 100644 --- a/homeassistant/components/esphome/__init__.py +++ b/homeassistant/components/esphome/__init__.py @@ -146,16 +146,18 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: if new_state is None: return entity_id = event.data.get("entity_id") - await cli.send_home_assistant_state(entity_id, new_state.state) + await cli.send_home_assistant_state(entity_id, None, new_state.state) async def _send_home_assistant_state( entity_id: str, new_state: State | None ) -> None: """Forward Home Assistant states to ESPHome.""" - await cli.send_home_assistant_state(entity_id, new_state.state) + await cli.send_home_assistant_state(entity_id, None, new_state.state) @callback - def async_on_state_subscription(entity_id: str) -> None: + def async_on_state_subscription( + entity_id: str, attribute: str | None = None + ) -> None: """Subscribe and forward states for requested entities.""" unsub = async_track_state_change_event( hass, [entity_id], send_home_assistant_state_event diff --git a/homeassistant/components/esphome/manifest.json b/homeassistant/components/esphome/manifest.json index 2f60c84a828..e103fa65992 100644 --- a/homeassistant/components/esphome/manifest.json +++ b/homeassistant/components/esphome/manifest.json @@ -3,7 +3,7 @@ "name": "ESPHome", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/esphome", - "requirements": ["aioesphomeapi==2.6.6"], + "requirements": ["aioesphomeapi==2.7.0"], "zeroconf": ["_esphomelib._tcp.local."], "codeowners": ["@OttoWinter"], "after_dependencies": ["zeroconf", "tag"], diff --git a/requirements_all.txt b/requirements_all.txt index 862dba2f420..f2ff61a58d2 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -160,7 +160,7 @@ aioeafm==0.1.2 aioemonitor==1.0.5 # homeassistant.components.esphome -aioesphomeapi==2.6.6 +aioesphomeapi==2.7.0 # homeassistant.components.flo aioflo==0.4.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index ccb08e35bfc..15721c5599f 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -100,7 +100,7 @@ aioeafm==0.1.2 aioemonitor==1.0.5 # homeassistant.components.esphome -aioesphomeapi==2.6.6 +aioesphomeapi==2.7.0 # homeassistant.components.flo aioflo==0.4.1