Commit Graph

802 Commits (41646a65144768d565e350924effa5ed717c4dda)

Author SHA1 Message Date
Jesse Hills d7d9143a44
Add speech detection and conversation_id to esphome voice assistant (#93578)
* Add speech detection to esphome voice assistant

* Timeout after silence
Ensure events are sent before finish is called

* use va_version 3 instead of ESPHome version

* Convert repeated fixtures to factory

* Add some v3 tests

* Add conversation_id

* Bump aioesphomeapi to 13.8.0

* Fix missed buffering of detected chunk

* Alter log message

* Updates

* Spelling

* Fix return type
2023-05-30 19:49:22 -04:00
Ville Skyttä 70c49824d7
Import `util.dt` as `dt_util` in `components/[e-f]*` (#93758) 2023-05-30 00:00:11 +03:00
J. Nick Koston 9443ca89bc
Handle exceptions to prevent disconnect when esphome state subscription raises (#93723) 2023-05-29 20:41:50 +02:00
Jesse Hills bb39b99a3f
ESPHome fix changing light color_mode (#93434) 2023-05-24 08:37:42 +02:00
epenet dad3fbf5e2
Fix lingering timer in esphome (#92533) 2023-05-17 22:05:44 +02:00
J. Nick Koston 64623283b2
Bump aioesphomeapi to 13.7.5 (#93121)
performance improvements

changelog: https://github.com/esphome/aioesphomeapi/compare/v13.7.4...v13.7.5
2023-05-15 22:24:17 +03:00
J. Nick Koston cdc4b315e5
Bump aioesphomeapi to 3.7.4 to fix proxied BLE connections not retrying right away on error (#92741) 2023-05-08 18:56:06 +02:00
J. Nick Koston 3f630493ff
Allow duplicate state updates when force_update is set on an esphome sensor (#92553)
* Allow duplicate states when force_update is set on an esphome sensor

fixes #91221

* Update homeassistant/components/esphome/entry_data.py

Co-authored-by: pdw-mb <pdw@mythic-beasts.com>

---------

Co-authored-by: pdw-mb <pdw@mythic-beasts.com>
2023-05-04 22:21:42 -04:00
J. Nick Koston 785faf4380
Bump aioesphomeapi to 13.7.3 to fix disconnecting while handshake is in progress (#92537)
Bump aioesphomeapi to 13.7.3

fixes #92432
2023-05-04 22:18:20 -04:00
Jesse Hills 32ed45084a
ESPHome voice assistant: Version 2 - Stream raw tts audio back to device for playback (#92052)
* Send raw audio back

* Update tests

* More tests

* Fix docstrings and remove unused patches

* More tests

* MORE

* Only set raw for v2
2023-04-26 22:24:29 -04:00
Paulus Schoutsen ddc2807361
Fix capitalization names Assist entities (#92098)
* Fix capitalization names Assist entities

* Adjust names to be 'in progress'

* Update tests/components/esphome/test_binary_sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-26 22:13:21 -04:00
Jesse Hills 29ca43acf6
Set pipeline_id from pipeline select (#92085) 2023-04-27 10:29:08 +12:00
J. Nick Koston ec5f50913a
Retry creating esphome update entities later if dashboard is unavailable (#92042) 2023-04-26 18:41:00 +02:00
J. Nick Koston 5f1fc3259c
Bump aioesphomeapi to 13.7.2 (#92027) 2023-04-26 09:12:52 +02:00
J. Nick Koston 458276a6a6
Bump aioesphomeapi to 13.7.1 (#91783)
changelog: https://github.com/esphome/aioesphomeapi/compare/v13.7.0...v13.7.1
2023-04-20 16:36:11 -10:00
J. Nick Koston c407fb0861
Bump recommended esphome version to 2023.4.0 for bluetooth (#91509) 2023-04-20 15:36:12 -10:00
Erik Montnemery 090f59aaa2
Make context a mandatory parameter for async_pipeline_from_audio_stream (#91658) 2023-04-19 09:30:29 -04:00
Jesse Hills aeb19831d2
ESPHome select for assist pipeline selection (#91526)
* ESPHome: Add assist pipeline select entity

* Add translation strings

* Tests
2023-04-17 22:22:11 -04:00
Jesse Hills 8d201b205f
ESPHome binary sensor representing assist pipeline running (#91406)
* ESPHome binary sensor representing assist pipeline running

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Rename to call active
Simplify with attrs a little

* Load binary sensor if voice assistant on device

* Add some tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-17 19:52:37 -04:00
Jesse Hills 42b0602190
ESPHome: Use existing property with generated signal string (#91525) 2023-04-16 18:37:12 -10:00
J. Nick Koston 4420201fe6
Use bluetooth data tools for address conversion in esphome (#91443) 2023-04-16 11:55:08 -10:00
Jesse Hills 0ddccb26fa
ESPHome voice assistant (#90691)
* Add ESPHome push-to-talk

* Send pipeline events to device

* Bump aioesphomeapi to 13.7.0

* Log error instead of print

* Rename variable

* lint

* Rename

* Fix type and cast

* Move event data manipulation into voice_assistant callback
Process full url

* Add a test?

* Remove import

* More tests

* Update import

* Update manifest

* fix tests

* Ugh

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-13 19:18:56 -04:00
J. Nick Koston 87c22c3ad5
Fix state being cleared on disconnect with deep sleep esphome devices (#90925)
* Fix state being cleared on disconnect with deep sleep esphome devices

fixes #90923

* fix logic
2023-04-06 16:32:02 -04:00
Jesse Hills eb469d6a2f
Move enum mapper to own file to prevent circular dependency (#90890)
* Move enum_mapper to own file to prevent circular dependency

* Add enum mapper test
2023-04-05 22:55:51 -04:00
J. Nick Koston 02c749a111
Bump aioesphomeapi to 10.6.1 (#90816) 2023-04-04 17:22:01 -10:00
J. Nick Koston c566303edb
Avoid writing state to all esphome entities at shutdown (#90555) 2023-03-31 18:23:05 +02:00
Alexander Momchilov abe60375b3
Disable esphome stopping a cover if the cover doesn't support stopping (#80104)
* Make "CoverEntityFeature.STOP" conditional

* Check APIVersion before checking false by default flag

* sort

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-28 16:43:47 +02:00
J. Nick Koston 6a5c05e7d2
Add support for clearing the on device GATT cache to esphome (#90318) 2023-03-27 09:34:28 +02:00
J. Nick Koston 65e46e3261
Bump aioesphomeapi to 13.6.0 (#90330) 2023-03-26 12:58:07 -10:00
J. Nick Koston a7c796a2f7
Ensure esphome connected future is awaited when connecting is canceled (#90329) 2023-03-26 12:30:00 -10:00
J. Nick Koston 8c9966aa05
Ensure esphome subscribes to bluetooth connection free before accepting connect requests (#90319) 2023-03-26 22:06:14 +02:00
epenet f56bf134d2
Improve browse_media type hints in media player (#90060)
* Improve browse_media type hints in media player

* Adjust components

* Adjust base entity
2023-03-24 21:49:12 -07:00
J. Nick Koston 0303618705
Handle cancelation of wait_for_ble_connections_free in esphome bluetooth (#90014)
Handle cancelation in wait_for_ble_connections_free

If `wait_for_ble_connections_free` was canceled due to timeout or
the esp disconnecting from Home Assistant the future would get
canceled. When we reconnect and get the next callback we need
to handle it being done.

fixes
```
2023-03-21 02:34:36.876 ERROR (MainThread) [homeassistant] Error doing job: Fatal error: protocol.data_received() call failed.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 868, in _read_ready__data_received
    self._protocol.data_received(data)
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/_frame_helper.py", line 195, in data_received
    self._callback_packet(msg_type_int, bytes(packet_data))
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/_frame_helper.py", line 110, in _callback_packet
    self._on_pkt(Packet(type_, data))
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 688, in _process_packet
    handler(msg)
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/client.py", line 482, in on_msg
    on_bluetooth_connections_free_update(resp.free, resp.limit)
  File "/usr/src/homeassistant/homeassistant/components/esphome/entry_data.py", line 136, in async_update_ble_connection_limits
    fut.set_result(free)
asyncio.exceptions.InvalidStateError: invalid state
```
2023-03-20 23:49:59 -04:00
J. Nick Koston 49f08ad71d
Filter out duplicate updates in esphome state dispatch (#89779) 2023-03-20 20:04:46 +01:00
J. Nick Koston c3043fb0ee
Bump bluetooth deps for bleak 0.20 (#89925)
Co-authored-by: K <z@kwi.li>
2023-03-20 12:06:15 +01:00
J. Nick Koston c707ddbf7c
Bump aioesphomeapi to 13.5.1 (#89777) 2023-03-15 20:00:47 -10:00
epenet ff2a88b426
Bump ruff to 0.0.254 (#89273) 2023-03-07 13:25:31 +01:00
J. Nick Koston ee89922c1b
Add support for bluetooth pairing in esphome (#88603)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-06 14:24:35 -10:00
J. Nick Koston 5ccaa549d1
Bump aioesphomeapi to 13.5.0 (#89262) 2023-03-06 14:04:10 -10:00
J. Nick Koston 83fa4c6c60
Bump aioesphomeapi to 13.4.2 (#89210) 2023-03-06 18:49:54 +01:00
epenet eebcf70b41
Re-enable Ruff D411 (#89035) 2023-03-02 13:01:05 -05:00
J. Nick Koston ee7dfdae30
Bump aioesphomeapi to 13.4.1 (#88703)
changelog: https://github.com/esphome/aioesphomeapi/releases/tag/v13.4.1
2023-02-24 11:09:12 -05:00
Michael Muré d14000f704
Add esphome climate quiet fan mode (#74303)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-21 11:09:41 -06:00
Jesse Hills 6da524b378
ESPHome: Add additional field for current temperature precision (#88464) 2023-02-20 09:54:40 +01:00
Franck Nijhof d3ed8de232
Update Ruff to v0.0.247 (#88210)
* Update Ruff to v0.0.247

* Fix new found violations
2023-02-15 16:46:03 -05:00
J. Nick Koston ae06d9fd5c
Bump aioesphomeapi to 13.3.1 (#87969)
* Bump aioesphomeapi to 13.3.0

We probably need to include https://github.com/esphome/aioesphomeapi/pull/382
as well in another bump

* bump
2023-02-13 09:07:56 -05:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Erik Montnemery 78c9b70c8d
Sort manifests 3 (#87024) 2023-02-08 20:19:19 +01:00
Franck Nijhof cc3ae5b19b
Mark ESPHome update entity unavailable when device is offline (#87576) 2023-02-07 22:15:54 +01:00
Marc Mueller 342b406dc0
Add Self typing (1) [mypy 1.0] (#87598) 2023-02-06 22:29:47 -06:00
Franck Nijhof 939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action ce79b26ab6 [ci skip] Translation update 2023-02-03 00:25:31 +00:00
epenet bd6a4d10ea
Use try_parse_enum in integrations (#87085) 2023-02-02 12:34:01 +01:00
GitHub Action 0f80932709 [ci skip] Translation update 2023-02-02 00:25:01 +00:00
Paulus Schoutsen ad87c4557d
Guard what version we can install ESPHome updates with (#87059)
* Guard what version we can install ESPHome updates with

* Update homeassistant/components/esphome/dashboard.py
2023-01-31 23:15:23 -05:00
Paulus Schoutsen 8417f22904
Trigger update of ESPHome update entity when static info updates (#87058)
Trigger update of update entity when static info updates
2023-01-31 22:13:41 -05:00
Paulus Schoutsen 1c4ba61725
Bump ESPHome Dashboard API 1.2.3 (#86997) 2023-01-31 00:05:59 -05:00
Paulus Schoutsen d88849fb04
ESPHome handle remove password and no encryption (#86995)
* ESPHome handle remove password and no encryption

* Start reauth for invalid api password

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-01-30 23:05:48 -05:00
Paulus Schoutsen 98b4a412f7
ESPHome discovered dashboard checks reauth flows (#86993) 2023-01-30 21:32:52 -05:00
Paulus Schoutsen 2cdeb6f1cd
Check dashboard when showing reauth form (#86980) 2023-01-30 22:46:42 +01:00
GitHub Action b82ecfdd28 [ci skip] Translation update 2023-01-30 00:21:11 +00:00
GitHub Action 0f6f63da64 [ci skip] Translation update 2023-01-29 00:26:29 +00:00
GitHub Action 072f228e4d [ci skip] Translation update 2023-01-28 00:23:36 +00:00
Jesse Hills 78207121c0
Remove esphome password from config flow data if not needed (#86763)
* Remove esphome password if not needed

* Add test

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-01-26 21:45:51 -05:00
Paulus Schoutsen 687184138c
ESPHome update: Store reference to runtime data, not one of its values (#86762)
Store reference to runtime data, not one of its values
2023-01-26 21:45:42 -05:00
GitHub Action 7ab88fa713 [ci skip] Translation update 2023-01-26 00:23:39 +00:00
Jesse Hills d0b67689e0
Add issue to ESPHome deprecating api password (#86606)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-25 11:07:57 +01:00
J. Nick Koston 978aafdd09
Update esphome bluetooth client for python 3.11 (#86480) 2023-01-23 21:36:19 +01:00
J. Nick Koston aac89a3493
Bump recommended esphome version for bluetooth proxies to 2022.12.4 (#86308)
This will fix an MTU issue reported with airthings and
other devices.

needs https://github.com/esphome/esphome/pull/4323
2023-01-22 00:05:06 +02:00
Paulus Schoutsen 8f10c22a23
Update ESPHome devices from HA (#86249)
* Update ESPHome devices from HA

* esphome-dashboard-api==1.2.2

* Limit to 1 parallel ESPHome update
2023-01-19 16:28:46 -05:00
Aarni Koskela c0d9dcdb3f
Fix docstring in esphome.bluetooth.client (#86226) 2023-01-19 15:21:32 +01:00
GitHub Action d1ecc418bb [ci skip] Translation update 2023-01-19 00:25:04 +00:00
Paulus Schoutsen a83318f373
ESPHome dashboard tweaks (#86176) 2023-01-18 21:15:37 +01:00
Paulus Schoutsen 29337bc6eb
Reload ESPHome config entries when dashboard info received (#86174) 2023-01-18 17:59:55 +01:00
Franck Nijhof 382e1ac679
Code styling tweaks to the ESPHome integration (#86146) 2023-01-18 11:10:16 +01:00
epenet 9205020fa4
Avoid import homeassistant.const as a module (#85991) 2023-01-16 16:49:49 +01:00
Jesse Hills d3c41bc31c
Add friendly name support for ESPHome (#85976)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-15 21:33:44 -10:00
GitHub Action b81453cb6b [ci skip] Translation update 2023-01-16 00:24:22 +00:00
GitHub Action 77f9548e51 [ci skip] Translation update 2023-01-15 00:25:52 +00:00
GitHub Action dffc913f9e [ci skip] Translation update 2023-01-14 00:22:57 +00:00
Ville Skyttä ae302bbec0
Make use of str.removeprefix and .removesuffix (#85584) 2023-01-13 12:19:38 +01:00
Franck Nijhof 9415e7e51b
Address small review comments in ESPHome (#85770) 2023-01-12 22:55:18 +01:00
Paulus Schoutsen c8cd41b5d4
Add ESPHome update entities (#85717) 2023-01-11 16:26:13 -05:00
Paulus Schoutsen 06bc9c7b22
Automatically fetch the encryption key from the ESPHome dashboard (#85709)
* Automatically fetch the encryption key from the ESPHome dashboard

* Also use encryption key during reauth

* Typo

* Clean up tests
2023-01-11 15:28:31 -05:00
Paulus Schoutsen 82ec769ec5
Handle ESPHome dashboard discovery (#85662) 2023-01-11 08:30:52 -05:00
J. Nick Koston 7bdfa7b9ec
Bump aioesphomeapi to 13.0.4 (#85406)
bugfix for protobuf not accepting bytearray

changelog: https://github.com/esphome/aioesphomeapi/compare/v13.0.3...v13.0.4
2023-01-08 20:09:49 -05:00
J. Nick Koston 6d012ea7c0
Bump aioesphomeapi to 13.0.3 (#85356)
Performance improvements

changelog: https://github.com/esphome/aioesphomeapi/compare/v13.0.2...v13.0.3
2023-01-06 23:00:38 -05:00
GitHub Action 2976f843b5 [ci skip] Translation update 2023-01-07 00:22:33 +00:00
GitHub Action bdd87bcc87 [ci skip] Translation update 2023-01-06 00:23:50 +00:00
GitHub Action 01e99c0229 [ci skip] Translation update 2023-01-05 00:23:39 +00:00
GitHub Action 5169721916 [ci skip] Translation update 2023-01-04 00:22:58 +00:00
J. Nick Koston 6b95fa5942
Fix bluetooth not being loaded with esphome proxies when removed from default_config (#85032)
* Fix bluetooth not being loaded with esphome proxies when removed from default_config

fixes #84960

* actually commit the conftest change
2023-01-02 21:10:39 -05:00
GitHub Action 6220804639 [ci skip] Translation update 2023-01-02 00:23:28 +00:00
GitHub Action 5c7120aa36 [ci skip] Translation update 2023-01-01 00:25:49 +00:00
Paulus Schoutsen 6d4489e822
Update description to guide user to find ESPHome encryption key. (#84928) 2022-12-31 15:21:24 -05:00
Paulus Schoutsen c6a0c7eccc
Tiny clean up of the ESPHome config flow (#84903)
Clean up the ESPHome config flow
2022-12-31 12:20:48 -05:00
GitHub Action dd560a517c [ci skip] Translation update 2022-12-30 00:23:31 +00:00
GitHub Action b3ab0a0199 [ci skip] Translation update 2022-12-29 00:23:20 +00:00
Jesse Hills 5874b4cdcf
ESPHome: do not set expected_name on APIClient (#84471) 2022-12-22 21:58:51 +01:00
Franck Nijhof b0cee0bc46
String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
GitHub Action b96eab3e5e [ci skip] Translation update 2022-12-19 00:21:16 +00:00
GitHub Action 6b858ce8af [ci skip] Translation update 2022-12-17 00:21:18 +00:00
GitHub Action 7f3f271a59 [ci skip] Translation update 2022-12-16 00:23:03 +00:00
J. Nick Koston e94da1ad0f
Update ESPHome bluetooth repair issue for unique id change and 2022.12.0 (#84026)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-12-15 06:59:53 -10:00
GitHub Action cfa08c5229 [ci skip] Translation update 2022-12-15 00:24:38 +00:00
J. Nick Koston 45a9c1ca8c
Bump aioesphomeapi to 13.0.2 to fix reconnects after bad protobuf message (#83951) 2022-12-13 12:57:54 -10:00
J. Nick Koston 5a970e0a2b
Adjust additional esphome bluetooth debug messages for unique id change (#83955) 2022-12-13 12:57:29 -10:00
GitHub Action b9753a9f92 [ci skip] Translation update 2022-12-13 00:27:47 +00:00
J. Nick Koston 95641fa780
Revert "Move esphome gatt services cache to be per device" #81265 (#83793) 2022-12-11 17:50:18 -10:00
GitHub Action 6745f0c56a [ci skip] Translation update 2022-12-12 00:24:56 +00:00
J. Nick Koston 7178cacdc2
Adjust esphome bluetooth client logging for unique id change (#83742) 2022-12-10 17:45:59 -10:00
Paulus Schoutsen d3df4dd3c1
ESPHome: Use MAC as unique ID (#83741)
* ESPHome: Use MAC as unique ID

* Normalize incoming zeroconf/dhcp macs

* Update comment

* Test ESPHome without mac in zeroconf

* Use format_mac

* Remove unique ID index from DomainData
2022-12-10 22:26:42 -05:00
J. Nick Koston 9094d73df1
Connect esphome ble scanner as soon as possible (#83728)
Other integration depend on it being available so connect
it first
2022-12-10 15:17:05 -05:00
J. Nick Koston 09f9bb05dc
Add bluetooth diagnostics to shelly (#83438)
* Add bluetooth diagnostics to shelly

* Add tests

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-12-09 10:55:10 -05:00
GitHub Action f25017313a [ci skip] Translation update 2022-12-09 00:24:29 +00:00
Franck Nijhof 04793978d3
Use CoverDeviceClass in ESPHome (#83395) 2022-12-06 13:29:58 +01:00
J. Nick Koston 3044e78d43
Avoid regex overhead in processing esphome bluetooth advertisements (#83246) 2022-12-04 21:09:45 -05:00
J. Nick Koston 1efc71624a
Bump aioesphomeapi to 13.0.1 (#83223)
fixes https://github.com/home-assistant/core/issues/83212
2022-12-04 21:09:10 -05:00
J. Nick Koston c617e7da31
Raise an exception when an esp proxy gets empty services during connection so callers know to retry (#83211) 2022-12-04 09:05:46 -10:00
epenet 44d3f2192c
Use UnitOfTemperature in climate entities [a-f] (#83125) 2022-12-04 11:53:56 +02:00
J. Nick Koston 955d4abf13
Fix missing services with esp32 proxies (#83192) 2022-12-03 13:50:59 -05:00
J. Nick Koston 4a56461d3c
Fix reauth with esphome when adding noise encryption (#83164)
* Fix reauth with esphome when adding noise encryption

fixes #80813

* fix with unique id
2022-12-02 19:49:13 -05:00
J. Nick Koston de1e97a81f
Fix esphome ble client leaking notify on disconnect (#83106)
* Fix esphome ble client leaking notify on disconnect

needs: https://github.com/esphome/aioesphomeapi/pull/329

* leak

* more cleanup

* more cleanup

* bump
2022-12-02 19:45:49 -05:00
GitHub Action 03154e1d83 [ci skip] Translation update 2022-12-03 00:21:50 +00:00
GitHub Action 0d1f476bee [ci skip] Translation update 2022-12-01 00:33:36 +00:00
J. Nick Koston f4ee38687c
Bump aioesphomeapi to 12.2.1 (#83017) 2022-12-01 01:10:40 +01:00
Marc Mueller 490aec0b11
Update pylint to 2.15.7 (#82977) 2022-11-30 12:20:18 +01:00
Franck Nijhof 412c12b992
Improve device class handling in ESPHome (#82923) 2022-11-29 14:07:56 +01:00
J. Nick Koston 46b18367f7
Send back BLE address type when connecting via esphome proxies (#82890) 2022-11-28 18:54:53 -10:00
J. Nick Koston fb98128b9f
Add support for esphome ble client connections v3 (#82815) 2022-11-28 16:56:18 -10:00
GitHub Action 230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
J. Nick Koston 1000f500df
Bump aioesphomeapi to 12.0.1 (#82873) 2022-11-28 18:40:04 +01:00
J. Nick Koston d451a74c2d
Add a destruction check to the ESPHome bluetooth client (#82760) 2022-11-27 21:17:35 -05:00
J. Nick Koston f0ae1cc6ce
Add bluetooth diagnostics to esphome (#82761) 2022-11-27 14:59:37 -05:00
GitHub Action 4becb9454b [ci skip] Translation update 2022-11-27 00:26:07 +00:00
GitHub Action 797dc51bc5 [ci skip] Translation update 2022-11-26 00:22:30 +00:00
J. Nick Koston 18dd605a74
Fix un-retrieved future in esphome ble client when library raises (#82537) 2022-11-24 10:38:53 -10:00
Jan Bouwhuis 23bc39b7f4
Add type hints on `Template().__init__()` (#82574) 2022-11-23 20:26:55 +01:00
J. Nick Koston 188cdd1bac
Ensure esphome client tasks await cancelation (#82547) 2022-11-23 10:07:05 +01:00
Jesse Hills 7c36f1409d
Bump aioesphomeapi to 12.0.0 (#82543) 2022-11-22 13:45:40 -06:00
epenet a225fc456f
Enforce LockEntityFeature (#82461) 2022-11-22 07:15:11 +01:00
epenet 12cb17620e
Enforce FanEntityFeature (#82458)
* Enforce FanEntityFeature

* Adjust pylint
2022-11-22 07:13:54 +01:00
epenet 48cc3071bb
Enforce ClimateEntityFeature (#82329) 2022-11-22 07:08:53 +01:00
J. Nick Koston a7caa038be
Accept advertisements from alternate scanners when a scanner stops scanning (#82448) 2022-11-21 21:23:07 -05:00
GitHub Action 0be2a3f182 [ci skip] Translation update 2022-11-22 00:26:32 +00:00
Marc Mueller 8f33ad38cf
Update pylint to 2.15.6 (#82440)
* Update pylint to 2.15.6

* Use single pylint disable

* Use implicit dict constructor
2022-11-21 08:58:45 +01:00
GitHub Action 3bea04e387 [ci skip] Translation update 2022-11-21 00:26:41 +00:00
GitHub Action fe5246fb6f [ci skip] Translation update 2022-11-19 00:26:11 +00:00
GitHub Action 5119005a8d [ci skip] Translation update 2022-11-18 00:29:16 +00:00
Franck Nijhof a07117470e
Add number device class support to ESPHome (#82277) 2022-11-17 21:12:45 +01:00
epenet 18e30e7c06
Adjust type hints for MediaPlayerEntityFeature (#82258) 2022-11-17 13:58:34 +01:00
epenet 8570d3aabe
Adjust type hints for LockEntityFeature (#82256) 2022-11-17 12:47:48 +01:00
epenet dd7bc7971f
Adjust type hints for LightEntityFeature (#82251) 2022-11-17 12:46:42 +01:00
epenet 1b80c66195
Adjust type hints for FanEntityFeature (#82241)
* Adjust type hints for FanEntityFeature

* Adjust template default
2022-11-17 10:30:39 +01:00
epenet 17573196c8
Adjust type hints for CoverEntityFeature (#82238) 2022-11-17 08:39:44 +01:00
GitHub Action c999953514 [ci skip] Translation update 2022-11-17 00:26:24 +00:00
epenet e85e79052b
Improve climate type hints for supported_features (#82223) 2022-11-16 23:07:48 +02:00
J. Nick Koston 4e11246ba5
Create an issue when using older esphome firmwares when bluetooth support is enabled (#82162)
* Create an issue when using older esphome firmwares when bluetooth support is enabled

2022.11.0 has some significant stability imporvements with
BLE. Its is non-obvious if the user is running an older
esphome version that does not have the fixes

* name

* skip repair issue if a project name is set

* drop reflashing term

* Update homeassistant/components/esphome/strings.json

* Update homeassistant/components/esphome/translations/en.json

* Update homeassistant/components/esphome/translations/en.json

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/esphome/translations/en.json

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/esphome/strings.json

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/esphome/strings.json

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/esphome/strings.json

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-11-16 22:16:51 +02:00
epenet 00f4933e72
Import tag from homeassistant.components (#82161) 2022-11-16 07:09:46 +01:00
epenet 1826795d37
Add TagProtocol for type checking (#81086)
* Add TagProtocol for type checking

* Adjust type hints
2022-11-14 14:32:10 +01:00
J. Nick Koston f584efa0c2
Move bluetooth remote scanner implementation into a base class (#82012) 2022-11-13 14:18:36 -06:00
J. Nick Koston 6517e3e21e
Fix esphome bleak client seeing disconnects too late (#81932)
* Fix esphome bleak client seeing disconnects too late

Because allbacks are delivered asynchronously its possible
that we find out during the operation before the callback
is delivered telling us about the disconnected.

We now watch for error code -1 which indicates the connection
dropped out from under us

* debug logging

* cleanup comment

* Fix comment grammar

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-11-11 09:09:28 +01:00
J. Nick Koston e7b5aaec47
Bump aioesphomeapi to 11.4.3 (#81676) 2022-11-06 17:13:14 -06:00
GitHub Action fc472eb040 [ci skip] Translation update 2022-11-06 00:27:15 +00:00
J. Nick Koston 6495c65d10
Align esphome ble client notify behavior to match BlueZ (#81463) 2022-11-05 15:28:47 -05:00
GitHub Action c7fc51cfa5 [ci skip] Translation update 2022-11-04 00:29:52 +00:00
J. Nick Koston 972b36b469
Adjust time to remove stale connectable devices from the esphome ble to closer match bluez (#81356) 2022-11-01 13:07:42 -04:00
J. Nick Koston d87ca0b099
Improve esphome bluetooth error reporting (#81326) 2022-10-31 21:21:11 -04:00
J. Nick Koston 1589c06203
Significantly reduce clock_gettime syscalls on platforms with broken vdso (#81257) 2022-10-31 09:35:08 -04:00
J. Nick Koston 8db7afb2e0
Include esphome device name in BLE logs (#81284)
* Include esphome device name in BLE logs

This makes it easier to debug what is going on when there
are multiple esphome proxies

* revert unintended change
2022-10-31 00:31:37 -05:00
J. Nick Koston ccefc510c3
Do not fire the esphome ble disconnected callback if we were not connected (#81286) 2022-10-30 22:10:30 -05:00
J. Nick Koston e709b74c3f
Bump aioesphomeapi to 11.4.1 (#81282) 2022-10-30 20:39:34 -05:00
J. Nick Koston 7e47aff316
Bump aioesphomeapi to 11.4.0 (#81277) 2022-10-30 19:24:14 -05:00
J. Nick Koston c8a3392471
Move esphome gatt services cache to be per device (#81265) 2022-10-30 18:02:54 -05:00
J. Nick Koston 11d7e1e45f
Provide a human readable error when an esphome ble proxy connection fails (#81266) 2022-10-30 17:43:09 -05:00
Jesse Hills 97d31d05f0
Use ESPHome manufacturer name from device if provided (#80928) 2022-10-25 09:15:28 +02:00
J. Nick Koston 27a61f5407
Raise exception when esphome ble client disconnects during operation (#80885) 2022-10-24 14:04:50 -05:00
J. Nick Koston 5589edd814
Fix bluetooth calls from automations in esphome (#80683) 2022-10-20 14:35:38 -04:00
Franck Nijhof c4bbc439a5
Integrations v2.1: Differentiating hubs, devices and services (#80524)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-19 12:41:43 +02:00
J. Nick Koston d12cbab6c4
Bump bleak to 0.19.0 (#80349) 2022-10-15 13:57:23 -04:00
J. Nick Koston 0c76e3a97e
Automatically determine the advertising interval for bluetooth devices (#79669) 2022-10-14 14:39:18 -04:00
GitHub Action 230fe4453f [ci skip] Translation update 2022-10-12 00:40:30 +00:00
J. Nick Koston 07d4ac42d4
Fix Bluetooth failover when esphome device unexpectedly disconnects (#79769) 2022-10-06 16:40:40 -10:00
Jesse Hills bc1941717c
Bump aioesphomeapi to 11.1.1 (#79762) 2022-10-07 02:17:31 +03:00
GitHub Action 7eb101b0c7 [ci skip] Translation update 2022-10-04 00:37:13 +00:00
Jesse Hills 8676012204
Bump aioesphomeapi to 11.1.0 (#79515) 2022-10-02 21:11:18 -04:00
J. Nick Koston dac60990ee
Ensure bluetooth disconnect callback fires if esphome config entry is reloaded (#79389) 2022-10-01 20:42:54 -04:00
J. Nick Koston ca0cd19dc9
Switch to using new esphome bluetooth_proxy_version field (#79331) 2022-09-30 08:29:36 -04:00
J. Nick Koston a01f18a3ac
Handle short local names from esphome proxies (#79321) 2022-09-29 14:37:31 -04:00
J. Nick Koston 0b5289f748
Wait for disconnect when we are out of connection ble slots in esphome (#79246) 2022-09-29 08:42:55 -04:00
J. Nick Koston 7042d6d35b
Add ESPHome BleakClient (#78911)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-09-28 08:06:30 -10:00
J. Nick Koston 8eaa22cf90
Break out esphome domain data (#79134) 2022-09-27 07:56:00 -10:00
Marc Mueller e8156adb13
Update mypy to 0.981 (#79115) 2022-09-26 16:10:06 -04:00
J. Nick Koston 75f6f9b5e2
Improve performance of Bluetooth device fallback (#79078) 2022-09-26 09:12:08 -04:00
GitHub Action 39ddc37d76 [ci skip] Translation update 2022-09-26 00:30:11 +00:00
epenet ec532414ba
Import climate constants from root [a-l] (#78177) 2022-09-10 23:39:52 +02:00
epenet a1aac4a2e9
Use new media player enums in esphome (#78099) 2022-09-10 22:12:37 +02:00
GitHub Action ccef03f1d4 [ci skip] Translation update 2022-09-02 00:25:46 +00:00
J. Nick Koston 9a5bdaf87e
Ensure unique id is set for esphome when setup via user flow (#77677) 2022-09-01 14:10:20 -04:00
epenet 0c401bcab2
Use _attr_temperature_unit in climate entities (#77472) 2022-08-29 10:20:55 +02:00
Marc Mueller 79bdc02829
Improve esphome state property decorator typing (#77152) 2022-08-26 10:52:05 +02:00
epenet a46c25d2c8
Use _attr_should_poll in components [a-g] (#77268) 2022-08-26 10:15:33 +02:00
J. Nick Koston 7f001cc1d1
ESPHome BLE scanner support (#77123)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-08-23 10:41:50 -04:00
GitHub Action eef7bdb44b [ci skip] Translation update 2022-08-22 00:27:12 +00:00
GitHub Action ff3fd4c29d [ci skip] Translation update 2022-08-16 00:30:51 +00:00
GitHub Action 6e03b12a93 [ci skip] Translation update 2022-08-13 00:25:00 +00:00
GitHub Action 7c81f790a7 [ci skip] Translation update 2022-08-12 00:23:47 +00:00
GitHub Action 519d478d61 [ci skip] Translation update 2022-08-11 00:26:23 +00:00
GitHub Action cb46441b74 [ci skip] Translation update 2022-08-05 00:28:51 +00:00
GitHub Action 33c635809c [ci skip] Translation update 2022-07-27 00:28:57 +00:00
GitHub Action 87797c8b66 [ci skip] Translation update 2022-07-21 00:26:18 +00:00
Marc Mueller d09fff595c
Rename existing TypeVars referencing Self type (#75473) 2022-07-20 03:03:22 +02:00
Marc Mueller 672883e19d
Remove old type casting in esphome (#75475) 2022-07-20 02:50:37 +02:00
Peter Galantha 3d2101cac5
Add total state_class for esphome (#75015) 2022-07-14 21:14:25 +02:00
GitHub Action a3fd5acf3f [ci skip] Translation update 2022-07-13 00:27:34 +00:00
J. Nick Koston cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
GitHub Action cdaefc8fda [ci skip] Translation update 2022-07-09 00:20:23 +00:00
GitHub Action 235abb0c10 [ci skip] Translation update 2022-07-07 00:27:55 +00:00
GitHub Action ebc8fba5bf [ci skip] Translation update 2022-07-05 00:23:09 +00:00
J. Nick Koston 40ed44cbea
Fix esphome state mapping (#74337) 2022-07-03 13:48:34 -07:00
GitHub Action 8581db1da7 [ci skip] Translation update 2022-07-03 00:26:52 +00:00
GitHub Action 647a023776 [ci skip] Translation update 2022-07-02 00:25:27 +00:00
J. Nick Koston 7655b84494
Fix key collision between platforms in esphome state updates (#74273) 2022-06-30 22:19:40 -07:00
GitHub Action 3970639c34 [ci skip] Translation update 2022-07-01 00:27:03 +00:00
R. de Veen 3899c9e6d3
Links to Esphomelib.com is changed to esphome.io (#72680) 2022-06-30 20:27:31 +02:00
Jesse Hills f311d53c60
ESPHome use dhcp responses to update connection host of known devices (#74206)
* ESPHome use dhcp responses to update connection host of known devices

* Add test for dhcp

* Add another test to cover when there are no changes required
2022-06-30 10:07:03 -07:00
J. Nick Koston ce03157f16
Add debug logging to esphome state updates (#74260) 2022-06-30 10:05:29 -07:00
epenet b51ad16db9
Adjust button type hints in components (#74132) 2022-06-28 17:19:03 +02:00
epenet dc039f5218
Use standard argument name in async_step_reauth (#74137) 2022-06-28 17:12:32 +02:00
epenet 38759bb98b
Adjust tilt_position method in esphome cover (#74041) 2022-06-28 11:08:31 +02:00
epenet 10dc38e0ec
Adjust CoverEntity property type hints in components (#73943)
* Adjust CoverEntity property type hints in components

* Revert changes to rflink

* Revert changes to wilight
2022-06-25 11:59:56 +02:00
epenet 837957d89e
Adjust set_percentage routine in fans (#73837) 2022-06-22 18:22:01 +02:00
epenet bd29b91867
Use Mapping for async_step_reauth (a-e) (#72763)
* Adjust abode

* Adjust airvisual

* Adjust aladdin_connect

* Adjust ambee

* Adjust aussie-broadband

* Adjust brunt

* Adjust cloudflare

* Adjust deconz

* Adjust deluge

* Adjust devolo_home_control

* Adjust efergy

* Adjust esphome
2022-06-20 09:08:11 +02:00
Erik Montnemery 1f7340313a
Migrate NumberEntity a-j to native_value (#73486) 2022-06-14 08:16:36 -10:00
J. Nick Koston a7f72931ad
Simplify esphome state updates (#73409) 2022-06-12 20:12:49 -07:00
Jesse Hills ca54eaf40d
Fix KeyError from ESPHome media players on startup (#73149) 2022-06-07 11:02:08 +12:00
Erik Montnemery 47d0cc9b09
Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
GitHub Action ceb8bb4745 [ci skip] Translation update 2022-05-21 00:22:49 +00:00
GitHub Action 9a3ecacf6b [ci skip] Translation update 2022-05-20 00:21:27 +00:00
Jesse Hills 8ff0ced846
Initial implementation of ESPHome media players (#72047)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-05-18 09:46:13 -07:00
Jesse Hills 23cb5cfd3f
Bump aioesphomeapi to 10.10.0 (#72083) 2022-05-18 14:27:02 +02:00
Jesse Hills 2bb6e4bb87
Bump aioesphomeapi to 10.9.0 (#72049) 2022-05-18 08:15:15 +02:00
GitHub Action 37f81b261d [ci skip] Translation update 2022-05-16 00:24:28 +00:00
GitHub Action 07706fa62a [ci skip] Translation update 2022-05-06 00:22:16 +00:00
GitHub Action 348016dbbf [ci skip] Translation update 2022-04-29 00:22:21 +00:00
epenet c3353e4726
Use climate enums in esphome (#70638) 2022-04-26 09:58:30 +02:00
epenet 31fbc088fe
Use ColorMode enum in esphome (#70490) 2022-04-23 09:13:40 -10:00
Franck Nijhof a22f36178f
Replace Climate HVAC_MODE_* constants with HVACMode enum (#70286)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-20 13:20:53 +02:00
epenet dae2cf2827
Use EntityFeature enum in esphome (#69386) 2022-04-06 11:52:59 +02:00
Jesse Hills 0558be0ab2
ESPHome: Remove disconnect callbacks after they are done (#69169) 2022-04-03 17:19:23 +02:00