Commit Graph

16143 Commits (93f8bd1430adece0a1296b4c44df8162437f82af)

Author SHA1 Message Date
epenet 24428d98a1
Fix lingering timer in smartthings tests (#91697) 2023-04-21 18:58:07 +02:00
Allen Porter 93eac97983
Relax the constraint that events must have a consistent timezone for start/end (#91788) 2023-04-21 10:25:52 -04:00
Paulus Schoutsen 78e29d526c
Disallow uploading files to bypass the media dirs (#91817) 2023-04-21 10:21:20 -04:00
Kevin Stillhammer 609a7ccda8
Use Selectors for waze_travel_time flows (#91778)
* Use Selectors for waze_travel_time flows

* Use correct selector option in tests

* Remove duplicate option

* Use suggested values
2023-04-21 12:57:45 +02:00
epenet 79ad9a3646
Shutdown coordinator on entry unload (#91748)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-21 10:07:31 +02:00
Jan Bouwhuis 92bb61d25b
Let MQTT availability for `snips` be managed by dependencies (#91790)
MQTT availability for snips via dependencies
2023-04-21 09:05:13 +02:00
Jan Bouwhuis 0552ec834d
Do not wait for mqtt at startup mqtt_statestream (#91721) 2023-04-21 09:00:48 +02:00
Jan Bouwhuis da26b0a930
Ensure dependencies are awaited correctly when setting up integrations (#91454)
* Do not wait

* Correct tests

* Manage after dependencies stage 1

* test bootstrap dependencies

* Assert log the dependenciy is waited for

* Improve docstrings

* Assert outside callback

* Patch async_get_integrations

* Revert changes made to snips integration

* Undo changes to mqtt_statestream
2023-04-21 08:33:50 +02:00
puddly 72414a5864
Load quirks in ZHA unit tests (#91779) 2023-04-21 08:24:39 +02:00
Franck Nijhof 65d7e48815
Update ruff to v0.0.262 (#91767) 2023-04-21 08:15:41 +02:00
Martin Hjelmare 1a18dc7425
Add tts entity (#91692)
* Add tts entity

* Allow passing engine id to url view

* Update async_resolve_engine

* Add and update more tests

* Fix assist pipeline tests temporarily

* Move fixtures

* Update notify platform

* Complete legacy tests

* Update media source tests

* Update async_get_text_to_speech_languages

* Address comment

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-20 22:55:46 -04:00
Michael Hansen 5080654776
VoIP listening tone and "not configured" message (#91762)
* Play tone when starting a VoIP call

* Play audio message when call is rejected

* Add option to disable tone for tests

* Send RTP audio in executor to reduce jitter

* Don't start pipeline until speech

* Bump voip utils
2023-04-20 20:30:51 -04:00
Keilin Bickar f4f3962ee9
Bump asyncsleepiq lib to 1.3.3 (#91772) 2023-04-20 12:01:49 -10:00
epenet 62f76a81bb
Fix wallbox tests (#91752) 2023-04-20 08:42:22 -10:00
Franck Nijhof fd3aa5338c
Add Supervisor add-on discovery to Wyoming integration (#91761) 2023-04-20 20:38:39 +02:00
Nathan Spencer 8ac74c5979
Bump pylitterbot to 2023.4.0 (#91759) 2023-04-20 20:29:35 +02:00
Michael Hansen 9fdc794b36
Prefer country over language family + MATCH_ALL (#91753)
* Prefer country over language family

* More test fixes
2023-04-20 13:55:26 -04:00
Erik Montnemery b3d50e67cd
Fix assist_pipeline tests (#91757) 2023-04-20 12:19:31 -04:00
Erik Montnemery 0525ce59d7
Add additional parameters to assist pipelines (#91619)
* Add additional parameters to assist pipelines

* Improve WS schema validation

* Tweak

* Add test

* Address review comments
2023-04-20 11:02:55 -04:00
Luke b4e0a1f1fc
Add new Roborock Integration (#89456)
* init roborock commit

* init commit of roborock

* removed some non-vacuum related code

* removed some non-needed constants

* removed translations

* removed options flow

* removed manual control

* remove password login

* removed go-to

* removed unneeded function and improved device_stat

* removed utils as it is unused

* typing changes in vacuum.py

* fixed test patch paths

* removed unneeded records

* removing unneeded code in tests

* remove password from strings

* removed maps in code

* changed const, reworked functions

* remove menu

* fixed tests

* 100% code coverage config_flow

* small changes

* removed unneeded patch

* bump to 0.1.7

* removed services

* removed extra functions and mop

* add () to configEntryNotReady

* moved coordinator into seperate file

* update roborock testing

* removed stale options code

* normalize username for unique id

* removed unneeded variables

* fixed linter problems

* removed stale comment

* additional pr changes

* simplify config_flow

* fix config flow test

* Apply suggestions from code review

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* First pass at resolving PR comments

* reworked config flow

* moving vacuum attr

* attempt to clean up conflig flow more

* update package and use offline functionality

* Fixed errors and fan bug

* rework model and some other small changes

* bump version

* used default factory

* moved some client creation into coord

* fixed patch

* Update homeassistant/components/roborock/coordinator.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* moved async functions into gather

* reworked gathers

* removed random line

* error catch if networking doesn't exist or timeout

* bump to 0.6.5

* fixed mocked data reference url

* change checking if we have no network information

Co-authored-by: Allen Porter <allen.porter@gmail.com>

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
Co-authored-by: Allen Porter <allen@thebends.org>
2023-04-20 07:02:58 -07:00
Erik Montnemery af193094b5
Add WS command for getting an assist pipeline (#91725)
* Add WS command for getting an assist pipeline

* Return preferred pipeline if none is specified
2023-04-20 09:15:19 -04:00
Erik Montnemery a98be9dc84
Test specifying pipeline in calls to async_pipeline_from_audio_stream (#91739) 2023-04-20 09:01:31 -04:00
Erik Montnemery 0429b321b8
Include matching languages in WS conversation/agent/list (#91730)
* Include matching languages in WS conversation/agent/list

* Allow specifying country
2023-04-20 08:58:43 -04:00
Erik Montnemery 768c499b6f
Include matching languages in WS stt/engine/list (#91731)
* Include matching languages in WS stt/engine/list

* Allow specifying country
2023-04-20 08:57:48 -04:00
Erik Montnemery 79de27a4a9
Include matching languages in WS tts/engine/list (#91732)
* Include matching languages in WS tts/engine/list

* Allow specifying country
2023-04-20 08:56:50 -04:00
Erik Montnemery 6d619579b4
Add WS API for listing languages supported by a full assist pipeline (#91669)
* Add WS API for listing languages supported by a full assist pipeline

* Address review comments, change logic
2023-04-20 08:55:17 -04:00
Jan Bouwhuis 0bcda9fe9c
Make sure MQTT client is available when starting depending platforms (#91164)
* Make sure MQTT is available starting mqtt_json

* Wait for mqtt client

* Sync client connect

* Simplify

* Addiitional tests async_wait_for_mqtt_client

* Improve comment waiting for mqtt

* Improve docstr

* Do not wait unless the MQTT client is in setup

* Handle entry errors during setup

* More comments - do not clear event

* Add snips and mqtt_room

* Add manual_mqtt

* Update homeassistant/components/mqtt/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Use a fixture, improve tests

* Simplify

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-20 08:07:35 +02:00
J. Nick Koston adc472862b
Fallback to generating a new ULID on migraiton if context is missing or invalid (#91704)
* Fallback to generating a new ULID on migraiton if context is missing or invalid

It was discovered that postgresql will do a full scan if
there is a low cardinality on the index because of missing
context ids. We will now generate a ULID for the timestamp
of the row if the context data is missing or invalid

fixes #91514

* tests

* tweak

* tweak

* preen
2023-04-19 21:56:07 -04:00
J. Nick Koston 56a6244d90
Remove legacy context lookup implementation from logbook (#91710)
* Remove legacy context lookup implemention from logbook

This object can now be replaced with a simple dict

* Remove legacy context lookup implemention from logbook

This object can now be replaced with a simple dict

* scope

* fix order issue
2023-04-19 21:54:34 -04:00
epenet 8d35426c69
Fix lingering timer in ZHA cluster tests (#91693) 2023-04-19 21:04:53 +02:00
epenet 1797dca0b8
Fix lingering timer in ZHA tests (#91688)
* Fix lingering timer in ZHA discovery tests

* Add type hints

* Also update gateway tests
2023-04-19 13:00:25 -04:00
J. Nick Koston 90e92aa9d8
Add test case for matching the shelly button (#91642) 2023-04-19 11:26:21 -04:00
J. Nick Koston f8fa382ebc
Add test coverage for bluetooth devices being rediscoverable after they go unavailable (#91645)
* Fix bluetooth devices not being discovered after they go unavailable and reavailable

* Update homeassistant/components/bluetooth/manager.py
2023-04-19 11:25:38 -04:00
Erik Montnemery b5ab83def4
Add test for WS conversation/agent/info (#91652) 2023-04-19 11:15:21 -04:00
Duco Sebel 9092f6a60f
Handle UnsupportedError in HomeWizard (#91608)
* Handle UnsupportedEror

* Make error message more clear

* Remove debug line, whoops
2023-04-19 11:14:28 -04:00
Erik Montnemery eabbe8969d
Adjust typing of AbstractConversationAgent.supported_languages (#91648)
* Adjust typing of AbstractConversationAgent.supported_languages

* Update test
2023-04-19 10:53:49 -04:00
Erik Montnemery 5e9bbeb4ad
Refactor conversation agent WS API for listing agents (#91590)
* Refactor conversation agent WS API for listing agents

* Add conversation/agent/info back
2023-04-19 10:53:24 -04:00
David F. Mulcahey 9c784ac622
Refactor ZHA (#91476)
* rename channel -> cluster handler

* remove refs to channels and create endpoint class

* remove remaining references to channels

* fix filter

* take in latest changes from #91403

* missed one

* missed a reference
2023-04-19 10:47:07 -04:00
Erik Montnemery 090f59aaa2
Make context a mandatory parameter for async_pipeline_from_audio_stream (#91658) 2023-04-19 09:30:29 -04:00
J. Nick Koston 408b2171ae
Handle long format context UUIDs during migration (#91657)
In https://github.com/home-assistant/core/issues/91514 is was discovered
these exist in older versions
2023-04-19 08:40:04 -04:00
Joost Lekkerkerker 88f5f04be8
Refactor LastFM to use shorthand attributes (#91606)
* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Preliminary PR for the coordinator

* Apply feedback

* Apply feedback

* Apply feedback

* Apply feedback

* Apply feedback

* Update homeassistant/components/lastfm/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/lastfm/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply feedback

* Apply feedback

* Fix tests

* Update homeassistant/components/lastfm/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Fix tests

* Fix feedback

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-19 14:13:43 +02:00
Erik Montnemery f3e6d6dfc0
Add async_get_supported_voices to tts.Provider (#91649)
* Add async_get_supported_voices to tts.Provider

* Update WS API
2023-04-19 13:47:49 +02:00
Michael Hansen 85d57a046c
Add wyoming integration with stt (#91579)
* Add wyoming integration with stt/tts

* Forward config entry setup

* Use SpeechToTextEntity

* Add strings to config flow

* Move connection into config flow

* Add tests

* On load/unload used platforms

* Tweaks

* Add unload test

* Fix stt

* Add missing file

* Add test for no services

* Improve coverage

* Finish test coverage

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-19 06:10:59 -04:00
G Johansson f74103c57e
Add config flow to Workday (#72558)
* Initial commit Workday Config Flow

* Add tests

* Remove day_to_string

* new entity name, new depr. version, clean

* Use repairs for depr. warning

* Fix issue_registry moved

* tweaks

* hassfest

* Fix CI

* FlowResultType

* breaking version

* remove translation

* Fixes

* naming

* duplicates

* abort entries match

* add_suggested_values_to_schema

* various

* validate country

* abort_entries_match in option flow

* Remove country test

* remove country not exist string

* docstring exceptions

* easier

* break version

* unneeded check

* slim tests

* Fix import test

* Fix province in abort_match

* review comments

* Fix import province

* Add review fixes

* fix reviews

* Review fixes
2023-04-19 11:50:11 +02:00
Mike Degatano a511e7d6bc
Make repairs out of select supervisor issues (#90893)
* Make repairs out of select supervisor issues

* Fix comment formatting

* Add a test case for API error

* Testing and type fix
2023-04-19 08:07:38 +02:00
Erik Montnemery dc3c47986b
Add property `supported_languages` to `AbstractConversationAgent` (#91588)
* Add property supported_languages to AbstractConversationAgent

* Fix test

* Use MATCH_ALL for openai supported languages
2023-04-18 15:11:04 -05:00
epenet ae0cbffdd8
Add ability to shutdown update coordinator (#91456)
* Add ability to shutdown update coordinator

* Adjust nibe_heatpump

* Add tests

* Use async

* Remove duplicate code in update coordinator

* Adjust

* Revert nibe changes - it can now be done in a follow-up PR

* Adjust

* Fix incorrect merge

* async_fire_time_changed
2023-04-18 18:56:43 +02:00
Erik Montnemery bdffb1f298
Drop language parameter from async_get_pipeline (#91612) 2023-04-18 18:07:20 +02:00
Erik Montnemery 10606c4d1e
Use the preferred assist pipeline if none was specified (#91611)
* Use the preferred assist pipeline if none was specified

* Add test
2023-04-18 17:35:33 +02:00
Erik Montnemery 016e051db6
Add timestamp to pipeline runs (#91599)
* Add timestamp to pipeline runs

* Include the timestamp in the list
2023-04-18 10:43:46 -04:00
Jan Bouwhuis 4132f08146
Remove check on remove deprecated call back for mqtt subscribe (#91464)
Remove check on deprecated callback wrapper
2023-04-18 16:02:24 +02:00
Paulus Schoutsen f3897d8dae
Bump hass-nabucasa to 0.65.0 (#91565) 2023-04-18 08:42:03 -04:00
J. Nick Koston 2ec1359063
Dynamically size recorder max backlog based on available memory (#90894)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-18 12:35:49 +02:00
Sander Striker f49dc65ff2
EasyEnergy: Add two additional sensors to help pick the best hours (#90543) 2023-04-18 10:18:51 +02:00
Michael Hansen f96515b90a
Use language util in stt/tts (#91521)
* Use language util in stt/tts

* Test language util in stt/tts

* Fix common in TTS

* Update snapshot
2023-04-17 23:23:43 -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
shbatm ef7e3e27ba
Remove previously deprecated ISY994 YAML support (#91575) 2023-04-17 15:37:19 -10: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
J. Nick Koston da4c144a5e
Fix history stats query using incorrect microseconds (#91250) 2023-04-17 11:37:30 -10:00
epenet 81f018b7e5
Make Debouncer shutdown async (#91542)
* Make shutdown async in Debouncer

* Adjust test
2023-04-17 23:31:30 +02:00
Erik Montnemery e32dacc62d
Add WS API to tts (#91330)
* Add WS API to tts

* Use language util, change from entity_id to engine_id

* Fix rebase mistake
2023-04-17 22:52:19 +02:00
Erik Montnemery b5817e40f7
Add WS API to `stt` (#91329) 2023-04-17 22:09:30 +02:00
Bram Kragten e3ff7d048a
Make tts/stt/conversation optional on pipeline (#91555) 2023-04-17 20:54:04 +02:00
Paulus Schoutsen bd22e0bd43
Allow picking a pipeline for voip devices (#91524)
* Allow picking a pipeline for voip device

* Add tests

* Fix test

* Adjust on new pipeline data
2023-04-17 12:09:11 -05:00
Martin Hjelmare 9bd12f6503
Move legacy tts (#91538)
* Move legacy tts

* Add error log on unknown platform

* Add legacy tests and delint all tests

* Consolidate log format

* Add more legacy tests

* Test default legacy provider attributes

* Remove test generated files

* Clean up after merge conflict
2023-04-17 13:01:50 -04:00
Erik Montnemery 0ecd23baee
Add WS API for debugging previous assist_pipeline runs (#91541)
* Add WS API for debugging previous assist_pipeline runs

* Improve typing
2023-04-17 11:48:02 -04:00
Erik Montnemery 8c1c7e1e4c
Remove PipelineEvent.as_dict (#91546) 2023-04-17 16:33:53 +02:00
mkmer 799080eb00
Don't reload integration for AuthError in Honeywell (#91228) 2023-04-17 14:55:52 +02:00
epenet 3364f0fce2
Allow config entries unload action to be coroutine (#91531)
* Allow config entries unload action to be coroutine

* Adjust comment
2023-04-17 08:41:25 -04:00
Allen Porter 4c5746d6ed
Update Todoist all day event handling following best practices (#90491) 2023-04-17 14:21:49 +02:00
epenet dd7de48efc
Fix lingering timers in sia tests (#91407) 2023-04-17 10:36:13 +02:00
J. Nick Koston b875706bdd
Default homekit to listening on all interfaces to match Home Assistant behavior (#91520) 2023-04-17 09:41:57 +02:00
jjlawren c88d4b09c9
Handle invalidated Plex token (#91438) 2023-04-17 09:38:16 +02:00
Christopher Bailey 5dcc4d49c8
Bump unifiprotect to 4.8.1 (#91522) 2023-04-16 17:50:06 -10:00
Christopher Bailey fdc80e14e6
Remove deprecated set_doorbell_message UniFi Protect service (#91523)
* Removes deprecated service

* Linting

* Linting

* More cleanup

* Linting
2023-04-16 17:30:41 -10:00
Jan Čermák 9680161701
Add RAPT Bluetooth integration (#87872)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 17:19:03 -10:00
Paulus Schoutsen 2b6fd0df6a
VoIP: Add is active call binary sensor (#91486)
* Refactor VoIP integration for more entities

* Add active call binary sensor

* Add actually missing binary sensor files

* Improve test coverage
2023-04-16 22:59:05 -04:00
Brett Adams 8fe900885a
Bump Advantage Air to 0.4.4 (#91147) 2023-04-16 14:56:57 -10:00
Lode Smets 263901841f
Add Synology Photos support (#86894)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
Co-authored-by: mib1185 <mail@mib85.de>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 12:29:15 -10:00
Brett Adams 5001a50876
Add MyPlace support to Advantage Air (#91108)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 12:27:37 -10:00
J. Nick Koston 7f7909e0d1
Add dhcp ip update support to onvif (#91474)
* Add dhcp ip update support to onvif

If we know the mac address of the camera we can
update the config entry when the ip changes

* fix lookup

* coverage

* remove unreachable

* remove unreachable

* remove unreachable
2023-04-16 15:55:33 -04:00
J. Nick Koston fdc6cf3472
Continue recording events until final write (#91260) 2023-04-16 09:22:47 -10:00
J. Nick Koston 9625444989
Automatically retry lost/timed out LIFX requests (#91157) 2023-04-16 14:27:17 +02:00
Allen Porter b0e0ada512
Streamline todoist test fixtures (#91405) 2023-04-16 14:20:07 +02:00
Mark Adkins 0cf29f0f84
Fix SharkIQ token expiration (#89357) 2023-04-16 14:04:18 +02:00
Maciej Bieniek 9d68cdca18
Remove `ozone` state attribute and `ozone` sensors from Accuweather (#91492) 2023-04-16 14:01:22 +02:00
Maciej Bieniek 09c41ca2d8
Bump nextdns to version 1.4.0 (#91490) 2023-04-16 13:51:07 +02:00
dougiteixeira dc03a5c81e
Fix error for when column does not exist in query to SQL (#91166)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-15 12:54:56 -10:00
Michael 323d16cc21
Add ssl_cipher_list option to rest (#91078) 2023-04-15 11:22:41 -10:00
Michael 67c4de90f3
Add option to select list of accepted ssl ciphers in httpx client (#91389) 2023-04-15 09:32:30 -10:00
Jan Bouwhuis f37b1fc9f8
Improve tests subscribe connection for mqtt status (#91463)
Improve test_subscribe_connection_status
2023-04-15 15:29:31 -04:00
Erik Montnemery 8f8a398631
Support marking an assist pipeline as preferred (#91418)
* Support marking an assist pipeline as preferred

* Adjust

* Revert unneeded change

* Send preferred pipeline id in pipeline list

* Don't use property functions for the preferred pipeline
2023-04-15 10:05:46 -04:00
puddly a9db39a833
Fix attribute reporting config failures in ZHA (#91403) 2023-04-15 15:48:34 +02:00
J. Nick Koston 1379ad60c8
Ensure recorder always attempts clean shutdown if recorder thread raises (#91261)
* Ensure recorder run shutdown if the run loop raises

If anything goes wrong with the recorder we should
still try to shutdown cleanly

* tweak

* tests

* tests

* handle migraiton failure

* tweak comment

* naming

* order

* order

* order

* reword

* adjust test

* fixes

* threading

* failure case

* fix test

* have to wait for stop because the task blocks on thread join
2023-04-14 21:03:24 -04:00
J. Nick Koston 56cc6633f5
Use fast path for track_time_change that fires every second (#91432)
We were missing a check for `*` and were only checking
`None`. Automations use `*`, python code uses `None`.
2023-04-14 21:02:54 -04:00
epenet 19a6530c3c
Add ability to shutdown a Debouncer (#91439)
* Add ability to shutdown a Debouncer

* Use async_create_task
2023-04-14 21:01:21 -04:00
Harvey bf4559719a
History API entity_id validation (#90067)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-14 09:41:54 -10:00
epenet f52fd13d6d
Remove duplicate webhook test (#91420)
Fix webhook test
2023-04-14 14:52:28 +02:00
Eric Severance 94f35ea968
Add webhook trigger allowed_methods/local_only options (#66494)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-14 12:49:12 +02:00
Jarek Świerczyński 47f5160154
Allow GET in webhook triggers (#56446) 2023-04-14 09:46:00 +02:00
Franck Nijhof ce16d8eeac
Rename Particulate matter sensors to PM (#91384) 2023-04-14 09:43:15 +02:00
Jan Bouwhuis fc8c5f1bbd
Do not allow mqtt lights to set brightness to zero (#91296)
* Do not allow mqtt lights to set brightness to zero

* Loglevel to debug

* Typo
2023-04-14 09:01:29 +02:00
Aaron Godfrey 7061b104a9
Fix tasks with no due date from not triggering `on` calendar state. (#91196)
Fix tasks with no due date.

Prior to this change we were setting the start date/time to utc rather
than the user's timezone.
2023-04-13 21:12:58 -07: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 e1a5ad069c
Improve performance of sums in the energy dashboard (#91342) 2023-04-13 11:52:38 -10:00
Erik Montnemery 4e80154ebe
Rename voice_assistant to assist_pipeline (#91371)
* Rename voice_assistant to assist_pipeline

* Fix tests

* Fix voip test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2023-04-13 17:25:38 -04:00
Franck Nijhof 32344a8488
Fix incorrect warn of async_update_ha_state use (#91387) 2023-04-13 22:39:03 +02:00
Martin Hjelmare 473cbf7f9b
Add stt entity (#91230)
* Add stt entity

* Update demo platform

* Rename ProviderEntity to SpeechToTextEntity

* Fix get method

* Run all init tests for config entry setup

* Fix and test metadata from header

* Test config entry unload

* Rename get provider entity

* Test post for non existing provider

* Test entity name before addition

* Test restore state

* Use register shutdown

* Update deprecation comment
2023-04-13 13:58:35 -04:00
Franck Nijhof 22a1a6846d
Warn for unneeded use of async_update_ha_state (#91372) 2023-04-13 13:49:56 -04:00
epenet 592ac37436
Add missing mock in sharkiq tests (#91325) 2023-04-13 19:33:38 +02:00
epenet 9e1a670e6e
Fail CI on lingering timers (part 2) (#89976)
* Fail CI on lingering timers (part 2)

* Improve error message

* Adjust tts
2023-04-13 17:03:52 +02:00
Joost Lekkerkerker a272f8dfb2
Move picnic sensor definitions (#91367)
* Move types and mixin to sensor

* Move types and mixin to sensor
2023-04-13 16:46:10 +02:00
epenet c1b7aa084c
Fix race condition in deconz (#91328)
* Fix race condition in deconz

* Use a new separate test
2023-04-13 15:04:21 +02:00
Duco Sebel 8ca3440f33
Bump python-homewizard-energy to 2.0.1 (#91097) 2023-04-13 13:42:35 +02:00
Franck Nijhof d320c73fb7
Use async_write_ha_state in tests (#91333) 2023-04-13 12:36:36 +02:00
J. Nick Koston 6dbe67e909
Bump httpx to 0.24.0 and httpcore to 0.17.0 (#91308) 2023-04-12 20:11:59 -10:00
Paulus Schoutsen c9d81bd217
Pipelines to default to Home Assistant agent (#91321)
* Pipelines to default to Home Assistant agent

* Tests fix
2023-04-13 00:34:19 -04:00
Paulus Schoutsen 0678ab4e45
Add VoIP entities (#91320)
* WIP

* Add VoIP entities to enable calls

* Mark voip entities as config only

* Remove commented code
2023-04-12 23:23:20 -04:00
Michael Hansen f0c625b2ad
Add language util (#91290)
* Add language util

* Add no match tests

* Update tests/util/test_language.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-12 20:27:09 -05:00
epenet 687c035bb2
Make auth test fixtures async (#91263)
Make auth fixtures async in tests
2023-04-12 20:43:50 -04:00
J. Nick Koston 4366f83ac8
Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313)
* Use local timezone for recorder connection

The fix in #90335 had an unexpected side effect of
using UTC for the timezone since all recorder operations
use UTC. Since only sqlite much use the database executor
we can use a seperate connection pool which uses local time

This also ensures that the engines are disposed of
when Home Assistant is shutdown as previously we
did not cleanly disconnect

* coverage

* fix unclean shutdown in config flow

* tweaks
2023-04-12 20:24:55 -04:00
Joakim Sørensen 2c8b704a6d
Add certificate status for cloud remote (#91277) 2023-04-13 00:38:32 +02:00
David Poll ea12d7a86f
Add pretty printing, key sorting, and better performance to to_json in Jinja (#91253)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-13 00:32:13 +02:00
epenet d483ad820c
Make hass test fixture async (#91264) 2023-04-12 23:55:40 +02:00
Brig Lamoreaux ff1fd86b91
Clean up srp_energy (#86822)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-12 23:47:37 +02:00
Assaf Inbal 7446ff478f
Add h264_v4l2m2m codec and profiles to HomeKit cameras (#91246) 2023-04-12 10:46:21 -10:00
Jan Bouwhuis 722b991234
Support unknown state, position or tilt for template cover (#91172)
* Support unknown state for template cover

* Remove not related changes
2023-04-12 21:23:24 +02:00
mkmer 6aa1460143
Add tests to honeywell (#87209)
* lower case aiosomecomfort

* add tests

* Test updates for 0.0.6

* lower case aiosomecomfort

* Missing changes after merge

* Add missing type hints

* Fix tests for PR#89393

* Test hold on when setting temperature

* Remove unnecessary init function

* Remove unnecessary assert

* Address missing tests
Cleanup related to comments for EM

* Move to snapshot for static test

* Updated snapshot

* Remove unnecessary assert
2023-04-12 20:34:32 +02:00
Jan Bouwhuis e36fd5f222
Allow None device_class and UOM for mqtt entities (#91240)
* Allow None device_class and UOM for mqtt entities

* Rever not needed changes

* Revert another unwanted change
2023-04-12 19:14:16 +02:00
Paulus Schoutsen 325733158d
Allow multiple instances for OpenAI (#90609)
* Allow multiple instances for OpenAI

* Add test
2023-04-12 08:29:13 -04:00
Chuck Deal a4a8f6ebc8
Add platform state tests for vesync integration (#90466)
* Test coverage for init and common

* Update snapshot

* break setup state snapshot test across platforms

* Fix state snapshot test methods

* Remove the test_init snapshot

* Remove test_common and test_init changes

* refactor the request_mock fixture
2023-04-12 14:15:22 +02:00
G Johansson 00847ee4bc
Add config flow to Brottsplatskartan (#70233)
* Brottsplatskartan Config Flow

* Fix import

* Modify sensor

* Mod version

* Mod version 2

* has_entity_name

* Fix api constructor

* Switch to issue for depr.

* Fix docstrings

* Minor cleaning

* Fix argument for bpk constructor

* remove translations

* Fix tests

* reset config

* uuid to conftest

* hassfest

* depr version

* unique id

* reset not linked changes

* review comments

* fix area none

* relevant changes

* depr version

* slim test

* unique_id

* create_entry

* review comments and tests

* fix init test

* review comments
2023-04-12 11:05:24 +02:00
Matthias Alphart 0ba339e56c
Run `socket.gethostbyname` in executor in Obihai and Sonos (#91190)
* Run  in executor in Obihai and Sonos

* fix Sonos test

* fix sonos test differently (review)
2023-04-12 09:58:27 +02:00
Jan Bouwhuis bb15923968
Rename MQTT entry mock and cleanup (#91223)
Rename to mqtt_mock_entry and cleanup
2023-04-12 09:43:03 +02:00
epenet e277bbb513
Use tmp_path in tests (#91203)
* Use tmp_path in tests

* Use joinpath

* Prefer / operator

* Cleanup
2023-04-12 08:19:01 +02:00
Michael 0916701a0b
Catch ssl errors in rest (#91074)
* catch ssl.SSLError

* add test

* fail setup on ssl error

* adjust tests
2023-04-12 06:51:41 +02:00
Erik Montnemery 2c9e9d0fde
Allow UI configuration of entities exposed to voice_assistant (#91233)
* Allow UI configuration of entities exposed to voice_assistant

* Invalidate cache when settings change

* Add tests

* Expose entities to conversation by default

* Update tests
2023-04-11 22:39:40 -04:00
J. Nick Koston 4e6937d20f
Avoid multiple round trips to the database for history API calls (#91193)
* delete more code

* tweak

* tweak

* wrappers

* restore lost performance

* restore lost performance

* restore lost performance

* compact

* reduce

* fix refactor

* DRY

* tweak

* delete the start time state injector

* move away the legacy code

* tweak

* adjust

* adjust

* tweak

* ignore impossible

* fix a bug where the first start was changed to the start time when there was no previous history recorded before

* avoid the empty scan most cases

* postgresql

* fixes

* workaround for mariadb < 10.4

* remove unused

* remove unused

* adjust

* bail early

* tweak

* tweak

* fix more tests

* fix recorderrun being init in the future in the test

* run history tests on schema 30 as well

* Revert "run history tests on schema 30 as well"

This reverts commit d798b100ac.

* reduce

* cleanup

* tweak

* reduce

* prune

* adjust

* adjust

* adjust

* reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code

* Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code"

This reverts commit bf974e103e.

* fix test

* Revert "Revert "reverse later is faster because the index is in forward order and the data size we are reversing is much smaller even if we are in python code""

This reverts commit 119354499e.

* more coverage

* adjust

* fix for table order

* impossible for it to be missing

* remove some more legacy from the all states
2023-04-11 22:38:23 -04:00
epenet 7f62ed15fa
Ensure entry is unloaded in azure event hub tests (#91224) 2023-04-11 16:31:05 -10:00
epenet 524832ceaf
Fix config entry unload in withings tests (#91210) 2023-04-11 16:29:49 -10:00
Michael Hansen 78fec33b17
Voip integration (#90945)
* Media playback working

* Working on OPUS audio

* Before rollback

* Fix is_end

* First working pipeline

* Clean up

* Remove asserts

* Send HA version in SDP

* Use async_pipeline_from_audio_stream

* Use config flow with allowed IP

* Satisfy ruff

* Remove use of regex for SIP IP

* Use voip-utils

* Fix imports

* Add Pipeline to __all__

* Fix voice assistant tests

* Basic VoIP test

* Run hassfest

* Generate requirements

* Bump voip utils (missing requirement)

* Allow tts_options to be passed in to pipeline run

* Add config flow tests

* Update test snapshots

* More tests

* Remove get_extra_info

* Appeasing the codebot
2023-04-11 20:25:05 -04:00
Erik Montnemery eb63bc7967
Fix switch_as_x name (#91232) 2023-04-11 13:54:30 -04:00
Jan Bouwhuis aa68d1d617
Cleanup mqtt CONFIG_SCHEMA_ENTRY (#90791) 2023-04-11 17:41:38 +02:00
Erik Montnemery 3c8397a7b9
Flush conversation name cache when an entity is renamed (#91214) 2023-04-11 08:33:08 -04:00
Robert Svensson 0d7711f787
Fix UniFi client tracker host_name missing (#91188) 2023-04-11 11:56:55 +02:00
epenet 7b3a932cd9
Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
epenet 2f7c5a56eb
Use tmp_path in recorder tests (#91202) 2023-04-11 09:18:16 +02:00
epenet a7093d3687
Fix flaky filesize tests (#91200)
* Fix flaky filesize tests

* Adjust constant usage

* Once more

* Use joinpath
2023-04-11 08:57:34 +02:00
Paulus Schoutsen 1aa8e94224
Voice Assistant: Require sample rate as input (#91182)
Require sample rate as input
2023-04-10 18:28:03 -05:00
Diogo Gomes 86fe0c9683
Track availability of source sensor in utility meter (#91035)
* track availability of source sensor

* address review comments
2023-04-10 12:37:45 -04:00
Anthony Mattas ee1644c24e
Fix configuring Flo instances (#90990)
* Update config_flow.py

Used constant string for consistency

* Update config_flow.py

Removed code for location ID and name the integration using the username

* Update manifest.json

Updated codeowners

* Update config_flow.py

* Update config_flow.py

Formatted with black

* Update manifest.json

Updated codeowners

* Update test_config_flow.py

Updated test
2023-04-10 12:37:36 -04:00
J. Nick Koston 49079691d4
Reduce overhead of legacy database columns on new installs (#90246)
* Reduce overhead of legacy database columns on new installs

* Reduce overhead of legacy database columns on new installs

* Reduce overhead of legacy database columns on new installs

* Reduce overhead of legacy database columns on new installs

* not working as expected

* override the type compiler

* override the type compiler

* override the type compiler

* override the type compiler

* Apply suggestions from code review

* pgsql char1

* make entity filter test setup with old schema

* fix some more tests that were mutating state

* fix some more tests that were mutating state

* fix some more tests that were mutating state

* fix more dbstate mutations

* add shim for older tests

* split migration tests

* add coverage for purging legacy data

* tweak

* more fixes

* drop some legacy

* fix another test

* fix a few more

* add casts for postgresql in case someone deletes the schema changes table

* dry

* dry

* dry
2023-04-10 10:08:46 -04:00
Allen Porter 14b95ffe3a
Relax calendar event validation to allow existing zero duration events (#91129)
Relax event valudation to allow existing zero duration events
2023-04-10 10:04:42 -04:00
J. Nick Koston 6e9fcbfec1
Fix false positive in SQL sensor full table scan check (#91134) 2023-04-09 19:45:08 -10:00
Brett Adams 82c80ec8d2
Bump Advantage Air to 0.4.2 (#91144) 2023-04-09 19:04:19 -10:00
J. Nick Koston d442f2aedb
Add names to homekit tasks to better track startup problems (#90802)
* Add names to homekit tasks to better track startup problems

* fix test
2023-04-08 23:13:47 -04:00
J. Nick Koston 59872f1914
Reduce bond fallback polling interval when BPUP is alive (#90871)
* Reduce bond fallback polling interval when BPUP is alive

If push updates are alive we should not check every
10 seconds.

* tweak

* tweak

* coverage

* coverage

* coverage
2023-04-08 23:12:42 -04:00
Allen Porter 23af02b941
Make location optional in google calendar create service (#91061) 2023-04-08 22:40:39 -04:00
J. Nick Koston 5f0d983df1
Make the device_tracker more forgiving when passed an empty ip address string (#91101)
This has come up over and over and over again

fixes #87165 fixes #51980
2023-04-08 22:32:56 -04:00
J. Nick Koston 69f751703b
Fix context_user_id round trip when calling to_native (#91098)
We do not actually use this in the history or logbook
APIs so nothing broke but there was a bug here for anyone
calling this directly

fixes #91090
2023-04-08 22:31:28 -04:00
J. Nick Koston 3d1556a4a2
Switch back to using call_later for the slow entity update warning (#91067)
* Switch back to using call_later for the slow entity update warning

I had originally changed this to create a task and wait
in #41184 but that does not make sense anymore with newer
cpython as the profile now shows the original method is cheaper
(or I did it wrong the first time)

* fix missing block till done since there is no longer a task being created which would run the event loop once
2023-04-08 22:22:56 -04:00
J. Nick Koston d0d4ab6056
Require a list of entity ids when fetching history (#90992) 2023-04-08 16:14:44 -10:00
Brett Adams 667a00e7f9
Handle all three operating modes in Advantage Air climate (#91107)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-08 13:50:26 -10:00
Diogo Gomes fe393c84e2
Delay utility_meter until HA has started (#91017)
* increase information for end user

* only warn after home assistant has started

* delay utility_meter until HA has startED
2023-04-08 10:36:34 -04:00
J. Nick Koston 53d7e33607
Raise an issue for legacy SQL queries that will cause full table scans (#90971)
* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Raise an issue for SQL queries that will cause full table scans

* Update homeassistant/components/sql/sensor.py

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

* coverage

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-07 22:32:36 -04:00
epenet 9705607db4
Fix lingering timer in cloud (#90822)
* Fix lingering timer in cloud

* Rename variable

* Improve

* Improve again

* Adjust

* Adjust

* Add property to HassJob instead

* Adjust

* Rename

* Adjust

* Adjust

* Make it read-only

* Add specific test
2023-04-07 11:38:17 +02:00
J. Nick Koston 398762fdd5
Resume entity id post migration after a restart (#90973)
* Restart entity id post migration after a restart

If the entity migration finished and Home Assistant was
restarted during the post migration it would never be resumed
which means the old index and space would never be recovered

* add migration resume test
2023-04-06 21:16:45 -04:00
Allen Porter 3595e2fd5a
Coerce previously persisted local calendars to have valid durations (#90970) 2023-04-06 16:41:38 -04:00
Steven Rollason 2b46734bd3
Fix command_template sensor value_template not being used if json_attributes set (#90603)
* Allow value_template to be used if json_attributes set

* Set state to None if no value_template and json_attributes used

* Refactor check for no value_template when json_attributes used

* Updated and additional unit test

* Updated to set _attr_native_value and return if value_template is None

* Update unit test docstring

* Updated test docstring based on feedback
2023-04-06 21:06:31 +02:00
Erik Montnemery 44c89a6b6c
Refactor handling of exposed entities for cloud Alexa and Google (#89877)
* Refactor handling of exposed entities for cloud Alexa

* Tweak WS API

* Validate assistant parameter

* Address some review comments

* Refactor handling of exposed entities for cloud Google

* Raise when attempting to expose an unknown entity

* Add tests

* Adjust cloud tests

* Allow getting expose new entities flag

* Test Alexa migration

* Test Google migration

* Add WS command cloud/google_assistant/entities/get

* Fix return value

* Update typing

* Address review comments

* Rename async_get_exposed_entities to async_get_assistant_settings
2023-04-06 13:09:45 -04:00
Erik Montnemery b3b83b7bb2
Add a pipeline store to voice_assistant (#90844)
* Add a pipeline store to voice_assistant

* Improve error handling

* Improve test coverage

* Improve test coverage

* Use StorageCollectionWebsocket

* Correct rebase
2023-04-06 12:55:16 -04:00
epenet 385630f9b4
Fix flaky test in vesync (#90921)
* Fix flaky test in vesync

* Move sorting to the test
2023-04-06 12:51:02 -04:00
Paulus Schoutsen 86e9f6643f
Allow TTS requests to resolve in the background (#90944) 2023-04-06 10:42:55 -05:00
Erik Montnemery 59a02cd08c
Allow storing other items than untyped `dict` in `StorageCollection` (#90932)
Allow storing other items than untyped dict in StorageCollection
2023-04-06 10:57:00 -04:00
Erik Montnemery 8025fbf398
Remove the coronavirus integration (#90934)
* Remove the coronavirus integration

* Run hassfest and gen_requirements_all
2023-04-06 10:43:09 -04:00
epenet 842d89f419
Rewrite mailbox tests (#90906)
* Rewrite mailbox tests

* Use some bytes for get_media

* Split __init__ method

* Cleanup lingering timers

* Simplify message text

* Simplify msgtime

* Remove cleanup

* Use a constant
2023-04-06 13:48:19 +02:00
Erik Montnemery fa308d8e10
Drop unused logger argument for StorageCollection() (#90913) 2023-04-06 13:28:34 +02:00
J. Nick Koston 96c5e845e5
Guard against invalid ULIDs in contexts while recording events (#90889) 2023-04-06 10:34:54 +02:00
J. Nick Koston 479a35c499
Revert "Move local calendar diagnostics to pytest.mark.freezetime" (#90899)
Revert "Move local calendar diagnostics to pytest.mark.freezetime (#90886)"

This reverts commit a01952981f.
2023-04-05 22:12:21 -07:00
Allen Porter a01952981f
Move local calendar diagnostics to pytest.mark.freezetime (#90886) 2023-04-05 19:57:09 -07: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
tronikos 49468ef5d0
Android TV Remote integration (#89935)
* Android TV Remote integration

* Add diagnostics

* Remove test pem files from when api was not mocked

* Address review comments

* Remove hass.data call in test

* Store the certificate and key in /config/.storage

* update comments

* Update homeassistant/components/androidtv_remote/__init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* import callback

* use async_generate_cert_if_missing

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-04-05 21:00:40 -04:00
J. Nick Koston b4fec762bc
Switch to fnv-hash-fast from fnvhash (#90761)
* Switch to fnv-hash-fast from fnvhash

Replaces the pure python implemention with a fast cpp one
when available (with fallback to pure python)

changelog: https://github.com/bdraco/fnv-hash-fast/releases/tag/v0.3.1
source: https://github.com/bdraco/fnv-hash-fast/tree/main/src/fnv_hash_fast

* Apply suggestions from code review

* lint
2023-04-05 20:52:23 -04:00
epenet 60692bcfdb
Fix lingering timers in calendar tests (#90845) 2023-04-05 20:46:05 -04:00
Erik Montnemery 4276ce96ea
Use send_json_auto_id in voice_assistant tests (#90857) 2023-04-05 19:07:42 -05:00
epenet 19ab76dad9
Fix lingering timers in sensor tests (#90856) 2023-04-05 19:52:30 +02:00
Stackie Jia 5c2af99520
Improve the HomeKit (de)humidifier min/max humidity handling (#90854) 2023-04-05 06:35:47 -10:00
epenet c01b1eb013
Adjust async_track_time_interval name argument (#90838)
Adjust async_track_time_interval naming
2023-04-05 10:58:02 -04:00
epenet acec2fd7db
Fix lingering timers in mailbox tests (#90830) 2023-04-05 14:09:51 +02:00
epenet 84f58543ef
Fix lingering timers in image processing tests (#90829) 2023-04-05 14:09:15 +02:00
epenet 35b642c6c8
Improve type hints in calendar trigger tests (#90827) 2023-04-05 14:08:55 +02:00
J. Nick Koston 7cf1926081
Fix BLEDevice not getting updated when details change for remote scanners (#90815) 2023-04-05 12:19:37 +02:00
Jan Bouwhuis 94817f61e5
Suppress imap logging on reconnect and presume state (#90826) 2023-04-05 12:18:16 +02:00
Paul Bottein 58ac8404ef
Add entity name translations to prusalink entities (#90833) 2023-04-05 12:17:00 +02:00
Mark Adkins 1f7ebe9249
SharkIQ Hotfix - Handle current installations by using default `REGION` (#90741)
* Add default region on async_setup_entry

* Move logic to migration function

* Move update logic back to setup function, but updates the config if needed.

* Remove commented out code

* Update Tests & Config setting method

* Update homeassistant/components/sharkiq/__init__.py

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

* Update homeassistant/components/sharkiq/__init__.py

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

* Accept Suggestions & Formatting

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-04 21:06:24 -04:00
Fabio De Simone 8495da1af0
Fix bluetooth_le_tracker reporting devices Home when they leave (#90641)
* fix bluetooth_le_tracker reporting devices Home when they leave

* refactor

* implement tests for BLE service_info.time check

* update bluetooth_le_tracker tests

* tweaks

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-04 20:59:57 -04:00
Vincent Knoop Pathuis 03caf63ec2
Remove getattr for Landis+Gyr Heat Meter (#90637)
* Remove getattr and update tests

* Apply suggestion for test from PR review

* Make constants capitalized
2023-04-04 22:01:35 +02:00
Patrick ZAJDA e748f0c623
Add entity name translations to Broadlink sensors (#90783)
* Add entity name translations to Broadlink sensors

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Update tests

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-04 15:18:41 -04:00
Jan Bouwhuis 4a0d3e881a
Rework MQTT config merging and adding defaults (#90529)
* Cleanup config merging and adding defaults

* Optimize and update tests

* Do not mix entry and yaml config

* Make sure hass.data is initilized

* remove check on get_mqtt_data

* Tweaks to MQTT client

* Remove None assigment mqtt client and fix mock
2023-04-04 18:12:18 +02:00
Erik Montnemery 28d85bc405
Run prettier on matter fixture (#90784) 2023-04-04 16:13:08 +02:00
Martin Hjelmare 535fb34207
Move legacy stt (#90776)
* Move legacy stt to separate module

* Remove case for None as provider

* Add error log for unknown platform

* Add some tests
2023-04-04 14:52:36 +02:00
epenet f24634e198
Use domain constants in rest tests (#90765) 2023-04-04 14:33:41 +02:00
hidaris a9e14cd8d7
Preliminary support for Matter cover (#90262)
Preliminary support for Matter cover, curtain tilt support has not been added yet.
2023-04-04 14:16:11 +02:00
Maciej Bieniek 2f22613cf9
Address late review for NextDNS entity name translations (#90771) 2023-04-04 12:56:39 +02:00
J. Nick Koston edd93e989e
Add render count to templates repr (#90753) 2023-04-03 19:38:15 -10:00
Paulus Schoutsen 79101b31d5
Fix frontend test again (#90754) 2023-04-04 00:11:20 -04:00
Paulus Schoutsen 6e4c78686e
Run pipeline from audio stream function (#90748)
* Run pipeline from audio stream function

* Fix tests

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2023-04-04 00:06:51 -04:00
J. Nick Koston 4f1574b859
Prevent overly large event data from being stored in the database (#90747)
This is the same change as #87105 for events
2023-04-04 00:02:49 -04:00
Avi Miller 5e7e96c5da
Remove the LIFX sensor update coordinator (#90740) 2023-04-03 17:48:32 -10:00
TheJulianJES a58b3721ed
Restore state for ZHA OnOff binary sensors (#90749)
* Restore state for ZHA OnOff binary sensors

* Let `Motion` extend `Opening`

`Motion` is just a specified version of `Opening` that only changes the device class for some motion sensors.
Since we have more "special code" in the OnOff/Opening sensor now, we also want to make sure that gets applied to `Motion` binary sensors.

* Improve comment and type

* Add test to verify that binary sensors restore last HA state
2023-04-03 22:27:57 -04:00
Michael d4d77d9395
Add sort list service to Shopping List (#90671) 2023-04-03 21:34:44 +02:00
Emory Penney 7c6a32ebb5
Add DHCP discovery to Obihai (#88984)
* Add DHCP discovery to Obihai

* Unique ID is MAC

* Move try blocks, cleanup

* Migrate existing unique_ids

* Use PyObihai to update Unique ID

* Auth then use get_device_mac

* Config flow changes

* Reworking flow according to feedback

* Cleanup
2023-04-03 21:17:56 +02:00
Matthias Alphart edaee89e34
Use entity name translations in Fronius (#90463) 2023-04-03 20:05:52 +02:00
Michael 682ebbd4d5
Add entity name translations to Luftdaten (#90725) 2023-04-03 19:55:54 +02:00
epenet 2d1bb6135c
Use entity name translations in 1-wire (#90696)
* Use entity name translations in onewire

* Adjust binary sensors

* Adjust switches

* Cleanup
2023-04-03 13:07:02 -04:00
Michael 9d508ac7ae
Add entity name translations to AVM Fritz!SmartHome (#90707)
* add entity name translation

* sort and capitalize

* adjust tests

* sort entities
2023-04-03 13:04:09 -04:00
Erik Montnemery c3091fad4c
Raise repair issue if OTBR and ZHA are on different channels (#90494)
* Raise repair issue if OTBR and ZHA are on different channels

* Update issues after creating or setting dataset

* Explain impact

* Add link to documentation, adjust language

* Update homeassistant/components/otbr/strings.json

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-03 13:02:10 -04:00
epenet 73d0124c98
Use entity name translations in Renault (#90697) 2023-04-03 18:20:11 +02:00
Michael 1cce55d176
Add entity name translations to NUT (#90709) 2023-04-03 18:18:23 +02:00
Michael aeeadb570a
Fix translation of status binary sensor in PI-Hole (#90719) 2023-04-03 16:38:54 +02:00
Patrick ZAJDA 4456557a02
Add entity name translations to Switchbot (#90600)
* Add entity name translations to Switchbot

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Apply suggestions from code review

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Fix tests

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Update homeassistant/components/switchbot/strings.json

Co-authored-by: Patrick ZAJDA <patrick@zajda.fr>

---------

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-04-03 10:10:30 -04:00
epenet 45038bac16
Use entity name translations in SFR Box (#90698) 2023-04-03 14:04:02 +02:00
Michael 628142527d
Add entity name translations to Pi-hole (#90713) 2023-04-03 14:00:27 +02:00
Michael 33a4c2c162
Add entity name translations to AVM Fritz!Tools (#90703)
* add entity name translation

* apply suggestions

* sort strings
2023-04-03 07:35:35 -04:00
Maciej Bieniek eb748416ed
Use the default entity names in GIOS (#90700) 2023-04-03 12:42:55 +02:00
Maciej Bieniek 34041c7564
Add entity name translations to NAM (#90681) 2023-04-03 12:37:01 +02:00
Maciej Bieniek cacd6708f0
Use the default entity names in Airly (#90693) 2023-04-03 10:50:24 +02:00
G Johansson 724eb7f2bd
Remove Darksky integration (#90322) 2023-04-03 10:34:36 +02:00
Nerdix d539bddabc
Correct handling if WIFI combine suffix is "None" (#90528)
* Correct handling of "None" WIFI combine suffix

* Update tests/components/unifi/test_config_flow.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Update tests/components/unifi/test_config_flow.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-04-03 09:47:08 +02:00
Jan Bouwhuis 580b20b0a8
Deprecate imap_content_sensor (#90429)
* Deprecate imap_content_sensor

* Rename unique_id to issue_id

* Migrate config to imap entry

* Improve dialogs

* Improve dialog texts

* Add repairs.py to .coveragerc

* Test the integration component setup

* Text tweak

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use flow for creating entries

* Rename schema add tests

* Patch client instead

* Add tests repairs - refactor async_step_confirm

* Comments test, correct calling next step

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-03 07:27:41 +02:00
J. Nick Koston 73714a6656
Ensure system log does not raise while processing logger messages (#90652) 2023-04-02 15:18:50 -10:00
J. Nick Koston 51ff027fce
Add object source logger to profiler (#90650)
* Add object source logger to profiler

* fixes

* cleanup

* tweaks

* logging

* logging

* too intensive

* adjust

* Update homeassistant/bootstrap.py

* fixes

* fixes

* coverage
2023-04-02 20:54:21 -04:00
J. Nick Koston 17719663f0
Fix memory churn in state templates (#90685)
* Fix memory churn in state templates

The LRU for state templates was limited to 512 states. As soon
as it was exaused, system performance would tank as each template
that iterated all states would have to create and GC any state
> 512

* does it scale?

* avoid copy on all

* comment

* preen

* cover

* cover

* comments

* comments

* comments

* preen

* preen
2023-04-02 20:51:25 -04:00
Paulus Schoutsen c5a87addc1
Fix frontend test (#90679) 2023-04-02 14:28:52 -04:00
Maciej Bieniek fc81b82932
Add entity name translations to GIOS (#90655)
* Add entity name translations

* Update tests
2023-04-02 14:25:38 -04:00
tronikos b52fab0f6d
Rename Android TV to Android Debug Bridge (#90657)
* Rename Android TV to Android debug bridge

* More renaming
2023-04-02 14:22:16 -04:00
J. Nick Koston 84292d4797
Cleanup some duplicate code in recorder statistics (#90549)
* Cleanup some duplicate code in recorder statistics

* more cleanup

* reduce

* reduce
2023-04-01 21:40:14 -04:00
Maciej Bieniek 5fc103947f
Add entity name translations to Brother (#90634)
* Add entity name translations

* Fix sensor name

* Update tests

* Suggested change
2023-04-01 21:39:46 -04:00
Jan Bouwhuis 9965d9d81d
Fix mqtt device_tracker is not reloading yaml (#90639) 2023-04-01 15:17:53 -04:00
starkillerOG b47ac524ea
Use async_timeout instead of asyncio.wait_for (#90496)
* Use async_timeout instead of asyncio.wait_for

* fix imports

* fix imports

* break out Event.wait patch

* Update tests/components/reolink/conftest.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Simplify

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-01 17:47:31 +02:00
Michael Hansen 90d81e9844
Use webrcvad to detect silence in pipelines (#90610)
* Add webrtcvad requirement

* Use webrcvad for voice command segmenting

* Add vad test
2023-03-31 23:55:07 -04:00
J. Nick Koston 44b35fea47
Speed up entity filter when there are many glob matchers (#90615)
* Speed up entity filter when there are many glob matchers

Since we do no care about which glob matches we can
combine all the translated globs into a single regex
which reduces the overhead

* delete unused code

* preen
2023-03-31 21:18:29 -04:00
J. Nick Koston f4c341253b
Avoid sorting domain/all states in templates (#90608) 2023-03-31 11:27:55 -10:00
puddly 3f398818c5
Perform an energy scan when downloading ZHA diagnostics (#90605) 2023-03-31 15:37:00 -04:00
Paulus Schoutsen 01a05340c6
Voice Assistant: improve error handling (#90541)
Co-authored-by: Michael Hansen <mike@rhasspy.org>
2023-03-31 14:04:22 -05:00
puddly 84eb9c5f97
Fix ZHA definition error on received command (#90602)
* Fix use of deprecated command schema access

* Add a unit test
2023-03-31 14:53:42 -04:00
Paulus Schoutsen ad26317b75
Conversation: allow getting agent info (#90540)
* Conversation: allow getting agent info

* Add unset agenet back
2023-03-31 14:36:39 -04:00
Paulus Schoutsen 8018be28ee
TTS: allow resolving engine and test supported options (#90539)
TTS: allow resolving engine
2023-03-31 13:34:42 -05:00
Franck Nijhof 469321157d
Raise on invalid (dis)arm code in manual alarm (#90579) 2023-03-31 16:08:16 +02:00
Franck Nijhof 8e77d215e7
Raise on invalid (dis)arm code in manual mqtt alarm (#90584) 2023-03-31 16:08:02 +02:00