-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Add ESPHome native API discovery #19399
Conversation
So the 0.85.0 release cutoff is waiting... What's the status on a netdisco release 😜 I was hoping to advertise this new release together with automatic discovery, but it's not a deal-breaker if it's not there just yet either. (If needed, I can also do the release now that I know more about pypi) |
@@ -21,6 +21,7 @@ | |||
from homeassistant.helpers.discovery import async_load_platform, async_discover | |||
import homeassistant.util.dt as dt_util | |||
|
|||
# TODO: Update netdisco |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Released 2.3.0. Bump it in this PR and I'll cherry pick it into the beta.
cc35e73
to
5e3757b
Compare
This PR did not cleanly apply to the Here is the beginning of the diff diff --cc tests/components/esphome/test_config_flow.py
index d90db501a,1291aa531..000000000
--- a/tests/components/esphome/test_config_flow.py
+++ b/tests/components/esphome/test_config_flow.py
@@@ -193,28 -188,62 +193,90 @@@ async def test_user_invalid_password(ha
}
++<<<<<<< HEAD
+async def test_user_login_connection_error(hass, mock_api_connection_error,
+ mock_client):
+ """Test user step with connection error during login phase."""
+ flow = config_flow.EsphomeFlowHandler()
+ flow.hass = hass
+ await flow.async_step_user(user_input=None)
+
+ mock_client.device_info.return_value = mock_coro(
+ MockDeviceInfo(True, "test"))
+
+ await flow.async_step_user(user_input={
+ 'host': '127.0.0.1',
+ 'port': 6053,
+ })
+
+ mock_client.connect.side_effect = mock_api_connection_error
+ result = await flow.async_step_authenticate(user_input={
+ 'password': 'invalid'
+ })
+
+ assert result['type'] == 'form'
+ assert result['step_id'] == 'authenticate'
+ assert result['errors'] == {
+ 'base': 'connection_error'
+ }
++=======
+ async def test_discovery_initiation(hass, mock_client):
+ """Test discovery importing works."""
+ flow = config_flow.EsphomeFlowHandler()
+ flow.hass = hass
+ service_info = {
+ 'host': '192.168.43.183',
+ 'port': 6053,
+ 'hostname': 'test8266.local.',
+ 'properties': {}
+ } I resolved it by keeping both pieces of code. |
* ESPHome discovery * Add note about netdisco * 🔡 * Address comments * Bump netdisco to 2.3.0 * Update requirements_all.txt
* ESPHome discovery * Add note about netdisco * 🔡 * Address comments * Bump netdisco to 2.3.0 * Update requirements_all.txt
* ESPHome discovery * Add note about netdisco * 🔡 * Address comments * Bump netdisco to 2.3.0 * Update requirements_all.txt
* ESPHome discovery * Add note about netdisco * 🔡 * Address comments * Bump netdisco to 2.3.0 * Update requirements_all.txt
Description:
Waiting for home-assistant-libs/netdisco#229 and new netdisco release
Checklist:
tox
. Your PR cannot be merged unless tests pass