* Decouple more of ESPHome Bluetooth support
The goal is to be able to move more of this into an external library
* Decouple more of ESPHome Bluetooth support
The goal is to be able to move more of this into an external library
* Decouple more of ESPHome Bluetooth support
The goal is to be able to move more of this into an external library
* Decouple more of ESPHome Bluetooth support
The goal is to be able to move more of this into an external library
* Decouple more of ESPHome Bluetooth support
The goal is to be able to move more of this into an external library
* fix diag
* remove need for hass in the client
* refactor
* decouple more
* decouple more
* decouple more
* decouple more
* decouple more
* remove unreachable code
* remove unreachable code
* Require esphome service calls to be enabled
For existing devices, calling Home Assistant services continues
to be allowed.
For newly configured devices, it must now be enabled in the options
flow
* fix
* adjust
* coverage
* adjust
* fix test
* Update homeassistant/components/esphome/strings.json
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Update homeassistant/components/esphome/strings.json
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Update homeassistant/components/esphome/strings.json
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Update homeassistant/components/esphome/__init__.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Update homeassistant/components/esphome/__init__.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Update homeassistant/components/esphome/__init__.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* 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>
* 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>
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
```
* 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
* ESPHome Climate add preset, custom preset, custom fan mode
* Fix copy paste error
* Bump aioesphomeapi to 3.0.0
* Bump aioesphomeapi to 3.0.1
* Persist api version to prevent exception for offline devices