Commit Graph

15939 Commits (79ad9a3646135f4ff0dfb5cbaa67700e15e7bbdb)

Author SHA1 Message Date
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
epenet 4f54e33f67
Allow removal of sensor settings in scrape (#90412)
* Allow removal of sensor settings in scrape

* Adjust

* Adjust

* Add comment

* Simplify

* Simplify

* Adjust

* Don't allow empty string

* Only allow None

* Use default as None

* Use sentinel "none"

* Not needed

* Adjust unit of measurement

* Add translation keys for "none"

* Use translations

* Sort

* Add enum and timestamp

* Use translation references

* Remove default and set suggested_values

* Disallow enum device class

* Adjust tests

* Adjust _strip_sentinel
2023-03-31 14:34:20 +02:00
Hans Oischinger ea32cc5d92
Refactor vicare config_flow tests (#90568)
* Refactor vicare config_flow tests

* Address review comments

* Remove unused parameters
2023-03-31 14:33:58 +02:00
Rami Mosleh 8cbe394028
Use `get_ha_sensor_data` method to update glances sensors (#83983)
* Use `get_ha_sensor_data` method to update sensor state

* update tests

* Use `get_ha_sensor_data` to validate connection

* Update test_sensor.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-31 14:27:37 +02:00
epenet ab699d17a5
Ensure numeric sensors have a valid value (#85605)
* Ensure numeric sensors have a valid value

* Flake8
2023-03-31 14:12:51 +02:00