J. Nick Koston
edaa5c60a7
Small cleanups to ESPHome ( #120414 )
2024-06-25 17:00:03 +02:00
J. Nick Koston
b5afc5a7f0
Fix incorrect mocking in ESPHome tests ( #120410 )
2024-06-25 13:31:50 +02:00
J. Nick Koston
c15718519b
Improve test coverage for ESPHome manager ( #120400 )
2024-06-25 13:14:11 +02:00
epenet
f5fd389512
Fix hass-component-root-import warning in esphome tests ( #119883 )
2024-06-18 12:39:36 +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
epenet
3e9d25f81d
Add missing argument type hints to component tests ( #119671 )
2024-06-14 09:26:46 +02:00
Sid
721b2c2ca8
Enable Ruff PT012 ( #113957 )
2024-06-08 17:59:08 +02:00
epenet
b2a54c50e2
Move mock_zeroconf to decorator in tests ( #119061 )
2024-06-07 20:55:20 +02:00
epenet
bfff3c0524
Add type hint to mock_async_zeroconf in test fixtures ( #119057 )
2024-06-07 12:09:18 +02:00
epenet
fb51163075
Move socket_enabled fixture to decorator ( #118847 )
2024-06-06 17:27:38 +02:00
epenet
4b663dbf01
Rename esphome fixture ( #118865 )
2024-06-05 13:31:59 +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
epenet
f120f55d86
Move enable_bluetooth fixture to decorator ( #118803 )
2024-06-04 16:20:11 +02:00
epenet
f178467b0e
Add type hints for TTS test fixtures ( #118704 )
2024-06-03 17:43:18 +02:00
epenet
83e77720e9
Improve type hints for mock_bluetooth/enable_bluetooth ( #118484 )
2024-05-30 22:16:45 -04:00
epenet
092cdcfe91
Improve type hints in tests (a-h) ( #118379 )
2024-05-30 08:46:18 +02: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
epenet
a59621bf9e
Add more type hints to pylint plugin ( #118319 )
2024-05-28 18:37:38 +02:00
epenet
8837c50da7
Use registry fixtures in tests (a-h) ( #118288 )
2024-05-28 13:15:16 +02:00
epenet
44f715bd02
Use issue_registry fixture in component tests ( #118041 )
2024-05-24 15:54:20 +02:00
Mischa Siekmann
ad69a23fda
Send MEDIA_ANNOUNCE flag to ESPHome media_player ( #116993 )
2024-05-23 09:47:34 +12: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
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
9b6863f182
ESPHome: Add datetime entities ( #115942 )
2024-04-22 13:12:22 +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
J. Nick Koston
dee99c764b
Complete ESPHome media_player coverage ( #114352 )
2024-04-13 16:29:14 -05: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
Sid
0d66d298ec
Enable Ruff RET504 ( #114528 )
...
* Enable Ruff RET504
* fix test
* Use noqa instead of cast
* fix sonos RET504
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
epenet
0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) ( #114925 )
2024-04-05 17:16:55 +02:00
epenet
24f83c5890
Use is in FlowResultType enum comparison in tests ( #114917 )
...
* Use is in FlowResultType enum comparison in tests
* Adjust auth
* Adjust systemmonitor
* Once more
* Add comment
2024-04-05 10:40:14 +02:00
Marc Mueller
3c5089bc3f
Update import for EventStateChangedData [a-h] ( #114899 )
2024-04-04 11:48:36 -10:00
Joost Lekkerkerker
9b41e3d124
Use is in enum comparison in config flow tests A-E ( #114669 )
2024-04-02 11:22:05 -10:00
J. Nick Koston
bec45dacf0
Add additional coverage to the ESPHome manager ( #114265 )
2024-03-27 20:52:45 -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
Jesse Hills
6ddef7bbff
ESPHome: Add Time Entity support ( #113852 )
2024-03-21 16:59:43 +13:00
Sid
00ec7f11f0
Enable Ruff rule PT007 ( #113764 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Sid
27e844e3bf
Add ruff B005, B015, B032 and fix occurrences ( #113543 )
...
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-15 17:48:37 -10: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
f1b5dcdd1b
Refactor handling of device updates in ESPHome ( #112864 )
2024-03-09 20:30:17 -10:00
Marc Mueller
cef20506dc
Replace EventType with Event [missing] ( #112753 )
2024-03-08 21:56:42 +01:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) ( #112750 )
2024-03-08 20:38:34 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] ( #112737 )
2024-03-08 19:16:21 +01:00
Marc Mueller
38adfbf1a3
Add empty line after module docstring [tests a-e] ( #112708 )
2024-03-08 08:50:25 -05:00
Michael Hansen
890e651bdd
Avoid race condition with UDP voice server starting in ESPHome ( #111644 )
...
* Avoid race condition with UDP server starting
* Fix test
2024-02-27 10:54:56 -06:00
dougiteixeira
34e9c29ef2
Esphome text sensor device class ( #111057 )
2024-02-25 16:56:52 -10:00
J. Nick Koston
b6b5b1f788
Fix race in ESPHome entity test ( #111179 )
...
This test relied on the event loop overhead. Change it
to listen for the state to change instead
2024-02-23 13:34:46 -05:00
J. Nick Koston
fd1f712d67
Bump esphome dependencies ( #110892 )
2024-02-19 10:38:28 +01:00
J. Nick Koston
bd4f8e0cc0
Fix races in ESPHome manager tests ( #110867 )
2024-02-18 17:06:57 +01:00
J. Nick Koston
730e8ab5f3
Fix formatting of mac addresses from dhcp discovery mocking in esphome ( #110567 )
...
dhcp returns addresses in lowercase without :
2024-02-14 20:57:37 +01:00
J. Nick Koston
b0d3cc150f
Use async_update_entry to update esphome options in tests ( #110118 )
2024-02-09 20:01:33 -06:00
Marc Mueller
7a89e58873
Use builtin TimeoutError [e-i] ( #109679 )
2024-02-05 12:00:37 +01:00
G Johansson
9831da34ce
Add new climate feature flags to esphome ( #109428 )
2024-02-04 14:57:26 +01:00
Michael Hansen
3347a3f8a6
More thorough checks in ESPHome voice assistant UDP server ( #109394 )
...
* More thorough checks in UDP server
* Simplify and change to stop_requested
* Check transport
2024-02-02 21:26:44 -05:00
J. Nick Koston
3447e7fddb
Fix ESPHome color modes for older firmwares ( #108870 )
2024-01-25 10:18:53 -10:00
J. Nick Koston
d588ec8202
Fix ESPHome not fully removing entities when entity info changes ( #108823 )
2024-01-24 17:29:11 -10:00
J. Nick Koston
3eb81bc461
Add coverage for scanning tags with ESPHome ( #107337 )
2024-01-08 09:20:27 +01:00
J. Nick Koston
d609344f40
Reduce duplicate code in ESPHome connection callback ( #107338 )
2024-01-08 09:10:58 +01:00
J. Nick Koston
81458dbf6f
Add test coverage for ESPHome state subscription ( #107045 )
2024-01-05 19:51:49 +01:00
J. Nick Koston
824bb94d1d
Add test coverage for ESPHome device info ( #107034 )
2024-01-05 14:00:38 +01:00
J. Nick Koston
9c69212ad5
Add test coverage for ESPHome service calls ( #107042 )
2024-01-04 09:37:56 +01:00
J. Nick Koston
4f213f6df3
Fix first ESPHome device update entity not offering install feature ( #106993 )
...
In the case where the user gets their first ESPHome device such as a RATGDO,
they will usually add the device first in HA, and than find the dashboard.
The install function will be missing because we do not know if the dashboard
supports updating devices until the first device is added. We now set the
supported features when we learn the version when the first device is added
2024-01-03 19:58:04 -05:00
J. Nick Koston
962c449009
Add missing coverage for esphome_state_property decorator ( #106998 )
2024-01-03 19:54:28 -05:00
J. Nick Koston
8d2ddb6a04
Small cleanups to ESPHome light platform ( #107003 )
...
- Remove unreachable code
- Cache filtering when possible
- Add missing coverage
2024-01-03 19:53:48 -05:00
J. Nick Koston
01d0031e09
Fix ESPHome service removal when the device name contains a dash ( #107015 )
...
* Fix ESPHome service removal when the device name contains a dash
If the device name contains a dash the service name is mutated to
replace the dash with an underscore, but the remove function did
not do the same mutation so it would fail to remove the service
* add more coverage
* more cover
2024-01-03 19:47:49 -05:00
J. Nick Koston
e2314565bb
Fix ESPHome Bluetooth diagnostics ( #106151 )
2023-12-20 18:33:43 -10:00
J. Nick Koston
5722b4a1ce
Break out the ESPHome Bluetooth scanner connection logic into bleak-esphome ( #105908 )
2023-12-20 13:36:37 -10:00
Ville Skyttä
24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts ( #106080 )
...
* Disable Ruff rules that may conflict with the formatter
* Upgrade Ruff to 0.1.8
- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8
* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
J. Nick Koston
89513efd8d
Refactor ESPHome Bluetooth connection logic to prepare for esphome-bleak ( #105747 )
2023-12-17 04:42:28 -10:00
J. Nick Koston
8d1a69ae84
Migrate ESPHome bleak implementation to bleak-esphome library ( #105611 )
2023-12-14 07:21:31 -10:00
J. Nick Koston
5dbd0dede1
Refactor Bluetooth scanners to avoid the need to pass a callback ( #105607 )
2023-12-13 09:17:48 +01:00
J. Nick Koston
f002a6a732
Refactor all Bluetooth scanners to inherit from BaseHaRemoteScanner ( #105523 )
2023-12-12 21:28:43 +01:00
Erik Montnemery
6908497c3d
Add minor version to config entries ( #105479 )
2023-12-12 08:44:35 +01:00
Tucker Kern
ff21c02cb6
Add preset modes to ESPHome fan entities ( #103781 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-06 06:53:52 -10:00
Michael Hansen
d793203163
Skip TTS when text is empty ( #104741 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-11-30 01:31:27 +01:00
Stefan Rado
d9c0acc1d2
Partially revert #103807 : Remove deprecated aux heat support from ESPHome climate entities ( #104694 )
2023-11-29 04:45:15 -06:00
Stefan Rado
017d05c03e
Add humidity and aux heat support to ESPHome climate entities ( #103807 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-11-29 17:57:30 +13:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format ( #102893 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
J. Nick Koston
fc5ae50e06
Bump aioesphomeapi to 19.0.0 ( #104512 )
2023-11-25 14:00:04 -06:00
J. Nick Koston
1c4d7e9588
Improve test coverage for ESPHome deep sleep entities ( #104476 )
2023-11-25 09:20:56 +01:00
J. Nick Koston
a9384d6d4f
Fix ESPHome BLE client raising confusing error when not connected ( #104146 )
2023-11-20 10:08:44 +01:00
Jan-Philipp Benecke
81450f0117
Update d-e* tests to use entity & device registry fixtures ( #103804 )
2023-11-12 10:38:32 +01:00
J. Nick Koston
2a80164508
Bump aioesphomeapi to 18.2.4 ( #103552 )
2023-11-07 11:22:41 +01:00
Michael Hansen
ae516ffbb5
Automatically convert TTS audio to MP3 on demand ( #102814 )
...
* Add ATTR_PREFERRED_FORMAT to TTS for auto-converting audio
* Move conversion into SpeechManager
* Handle None case for expected_extension
* Only use ATTR_AUDIO_OUTPUT
* Prefer MP3 in pipelines
* Automatically convert to mp3 on demand
* Add preferred audio format
* Break out preferred format
* Add ATTR_BLOCKING to allow async fetching
* Make a copy of supported options
* Fix MaryTTS tests
* Update ESPHome to use "wav" instead of "raw"
* Clean up tests, remove blocking
* Clean up rest of TTS tests
* Fix ESPHome tests
* More test coverage
2023-11-06 15:26:00 -05:00
Jesse Hills
ad692f3341
ESPHome Text entities ( #102742 )
2023-10-24 23:14:58 -05:00
J. Nick Koston
88296c1998
Migrate ESPHome unique ids to new format ( #99451 )
2023-10-15 17:05:20 -10:00
J. Nick Koston
5b8da03596
Bump aioesphomeapi to 18.0.1 ( #102028 )
...
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-10-14 23:42:22 -10:00
Robert Resch
f7292d5b00
Add check that sensors don't have EntityCategory.CONFIG set ( #101471 )
2023-10-09 13:37:52 +02:00
Jesse Hills
d41144ee88
ESPHome: dont send error when wake word is aborted ( #101032 )
...
* ESPHome dont send error when wake word is aborted
* Add test
2023-09-27 23:39:57 -04:00
Jesse Hills
4c21aa18db
Add audio_settings for pipeline from ESPHome device ( #100894 )
...
* Add audio_settings for pipeline from ESPHome device
* ruff fixes
* Bump aioesphomeapi 17.0.0
* Mypy
* Fix tests
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-09-26 16:27:26 -05:00
J. Nick Koston
0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions ( #100567 )
2023-09-19 18:58:46 +02:00
Joost Lekkerkerker
f1fb28aad5
Use snapshot assertion for ESPHome diagnostics test ( #98913 )
2023-08-24 01:01:58 +02:00
J. Nick Koston
49d73441bf
Abort ESPHome connection when both name and mac address do not match ( #98787 )
2023-08-22 23:02:23 +02:00
Jesse Hills
a42d975c49
ESPHome Wake Word support ( #98544 )
...
* ESPHome Wake Word support
* Remove all vad code from esphome integration
* Catch exception when no wake word provider found
* Remove import
* Remove esphome vad tests
* Add tests
* More tests
2023-08-21 12:13:02 -04:00
J. Nick Koston
5bf80a0f6d
Make ESPHome deep sleep tests more robust ( #98535 )
2023-08-16 11:05:22 -05:00
Marc Mueller
e2d2ec8817
Use asyncio.timeout [b-e] ( #98448 )
2023-08-15 08:30:20 -05:00
Franck Nijhof
868a5f377f
Ruff: isort don't split imports based on trailing comma ( #98162 )
2023-08-10 14:27:03 +02:00