Commit graph

884 commits

Author SHA1 Message Date
Jesse Hills
72d706ab52
[ESPHome] Disable dashboard based update entities by default (#120907)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-07-02 13:51:14 +02:00
Jesse Hills
1f54180807
Mark esphome integration as platinum (#112565)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-06-27 06:26:38 -05:00
Michael Hansen
d515a7f063
Add created_seconds to timer info and pass to ESPHome devices (#120364) 2024-06-26 14:20:11 +02:00
J. Nick Koston
c4b277b6ab
Small cleanups to ESPHome manager reconnect shutdown (#120401) 2024-06-25 19:40:04 +02:00
J. Nick Koston
4feca36ca6
Refactor esphome platform setup to reduce boilerplate (#120415) 2024-06-25 17:03:04 +02:00
J. Nick Koston
edaa5c60a7
Small cleanups to ESPHome (#120414) 2024-06-25 17:00:03 +02:00
J. Nick Koston
fccb7ea1f9
Migrate ESPHome to use entry.runtime_data (#120402) 2024-06-25 13:10:09 +02:00
J. Nick Koston
436c36e3dd
Bump aioesphomeapi to 24.6.1 (#120261) 2024-06-23 22:20:46 +02:00
Jesse Hills
f8711dbfbf
Add esphome native device update entities (#119339)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-06-18 16:31:50 +12:00
J. Nick Koston
dbd3147c9b
Remove async_late_forward_entry_setups and instead implicitly hold the lock (#119088)
* Refactor config entry forwards to implictly obtain the lock instead of explictly

This is a bit of a tradeoff to not need async_late_forward_entry_setups

The downside is we can no longer detect non-awaited plastform setups
as we will always implicitly obtain the lock instead of explictly.

Note, this PR is incomplete and is only for discussion purposes
at this point

* preen

* cover

* cover

* restore check for non-awaited platform setup

* cleanup

* fix missing word

* make non-awaited test safer
2024-06-12 21:06:11 -04:00
Jesse Hills
cdd9f19cf9
Bump aioesphomeapi to 24.6.0 (#119348) 2024-06-11 07:32:40 +02:00
J. Nick Koston
ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
Jesse Hills
035e21ddbb
[esphome] 100% voice assistant test coverage (#118334) 2024-05-28 21:14:47 -04:00
Jesse Hills
7f530ee0e4
[esphome] Assist timers (#118275)
* [esphome] Assist timers

* Add intent to manifest dependencies

* Add test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-28 14:57:58 -04:00
Jesse Hills
a23da3bd46
Bump aioesphomeapi to 24.5.0 (#118271) 2024-05-28 13:03:01 +12:00
Mischa Siekmann
ad69a23fda
Send MEDIA_ANNOUNCE flag to ESPHome media_player (#116993) 2024-05-23 09:47:34 +12:00
Marc Mueller
b93312b62c
Use PEP 695 for class annotations (1) (#117775) 2024-05-20 10:42:57 +02:00
Mischa Siekmann
481264693e
Bump aioesphomeapi to 24.4.0 (#117543) 2024-05-16 10:53:00 +02:00
epenet
2e155f4de5
Move esphome coordinator to separate module (#117427) 2024-05-14 15:16:47 +02:00
Markus
ed4c3196ab
Add ESPhome discovery via MQTT (#116499)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-10 13:32:42 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
b456d97e65
Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
J. Nick Koston
d0f5e40b19
Refactor ESPHome manager to avoid sending signals in tests (#116033) 2024-04-24 16:14:44 +02:00
David Friedland
e3016b131a
Add Event support to ESPHome components (#116061)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-04-24 13:22:03 +12:00
Jesse Hills
85203aeb28
Bump aioesphomeapi to 24.3.0 (#116004) 2024-04-23 11:23:28 +02:00
Jesse Hills
9b6863f182
ESPHome: Add datetime entities (#115942) 2024-04-22 13:12:22 +02:00
Jesse Hills
46941adb51
Bump aioesphomeapi to 24.2.0 (#115943) 2024-04-22 10:30:14 +02:00
Keith Burzinski
14515b77bb
Add valve entity support for ESPHome (#115341)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-04-17 20:47:15 -05:00
Jesse Hills
94a66fa648
Bump aioesphomeapi to 24.1.0 (#115729) 2024-04-17 15:39:38 +12:00
Jesse Hills
68384bba67
Send/receive Voice Assistant audio via ESPHome native API (#114800)
* Protobuf audio test

* Remove extraneous code

* Rework voice assistant pipeline

* Move variables

* Fix reading flags

* Dont directly put to queue

* Bump aioesphomeapi to 24.0.0

* Update tests

- Add more tests for API pipeline
- Convert some udp tests to use api pipeline
- Update fixtures for new device info flags

* Fix bad merge

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-04-09 10:55:59 -04:00
J. Nick Koston
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately (#115169) 2024-04-08 10:07:54 -10:00
Marc Mueller
3c5089bc3f
Update import for EventStateChangedData [a-h] (#114899) 2024-04-04 11:48:36 -10:00
Sid
a5b609f081
Enable ruff TRY401 (#114395)
* Enable ruff TRY401

* fix tests
2024-03-29 07:20:36 +01:00
J. Nick Koston
bec45dacf0
Add additional coverage to the ESPHome manager (#114265) 2024-03-27 20:52:45 -10:00
Marc Mueller
09ebca9630
Use SignalType to improve typing [esphome] (#114296) 2024-03-27 08:22:10 -04:00
J. Nick Koston
a0d43aeba2
Remove unused code in ESPHome entry_data (#114263) 2024-03-26 10:32:16 -10:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
efc54971d3
Update empty line formatting after module docstring (#114040) 2024-03-23 00:27:57 +01:00
Jesse Hills
6ddef7bbff
ESPHome: Add Time Entity support (#113852) 2024-03-21 16:59:43 +13:00
Jesse Hills
510e7ccf76
Bump aioesphomeapi to 23.2.0 (#113854) 2024-03-19 19:40:09 -10:00
J. Nick Koston
dbbd6fff01
Move ESPHome disconnects to the close event (#113652) 2024-03-17 08:15:28 -10:00
Sid
6ee273a548
Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
soonsouth
cfc2f17f35
Remove repetitive words in comments and docstrings (#113529)
chore: remove repetitive words

Signed-off-by: soonsouth <cuibuwei@163.com>
2024-03-15 18:11:12 +01:00
Jesse Hills
3d7d3d263d
ESPHome: Add Date Entity support (#112475)
* ESPHome: Add Date Entity support

* Formatting

* Add missing state test
2024-03-13 08:02:52 +01:00
Jesse Hills
a2a8a8f119
ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
J. Nick Koston
4c82196fc8
Avoid some event loop overhead for ESPHome listeners (#113173) 2024-03-12 21:49:31 +01:00
Joost Lekkerkerker
643e6096da
Improve lists in integrations [E-F] (#113075) 2024-03-12 18:42:43 +01:00
J. Nick Koston
e96ef4613c
Bump aioesphomeapi to 23.1.1 (#113016)
changelog: https://github.com/esphome/aioesphomeapi/compare/v23.1.0...v23.1.1

Fixes cryptic error message the user tried to send a command
or execute a service call when the device was disconnected
2024-03-10 23:18:49 -04:00
J. Nick Koston
f1b5dcdd1b
Refactor handling of device updates in ESPHome (#112864) 2024-03-09 20:30:17 -10:00
Marc Mueller
25237e0377
Replace EventType with Event [a-g] (#112739) 2024-03-08 19:35:17 +01:00