Commit Graph

228 Commits (fc3c384e0ac136de733e0dae355e6430777fb10b)

Author SHA1 Message Date
J. Nick Koston 4ebce9746d
Add schema auto repairs for states tables (#90083) 2023-03-22 10:05:23 -10:00
J. Nick Koston ddcaa9d372
Break out statistics repairs into a `auto_repairs` modules (#90068)
* Break out statistics schema repairs into a repairs module

A future PR will add repairs for events, states, etc

* reorg

* reorg

* reorg

* reorg

* fixes

* fix patch targets

* name space rename
2023-03-21 21:08:06 -04:00
epenet 9a784fddef
Fail CI on lingering timers (#89292) 2023-03-20 10:20:19 +01:00
epenet 9893b1cf4a
Cleanup get_local_ip in global conftest (#89826) 2023-03-16 22:03:06 +01:00
epenet 913156b0e0
Avoid lingering timer on script shutdown (#89753) 2023-03-16 08:00:21 +01:00
J. Nick Koston ccab45520b
Remove asyncio.coroutine workarounds (#88560) 2023-03-15 20:04:31 -04:00
J. Nick Koston b9ac6b4a7c
Improve reliability of context id migration (#89609)
* Split context id migration into states and events tasks

Since events can finish much earlier than states we
would keep looking at the table because states as not
done. Make them seperate tasks

* add retry dec

* fix migration happening twice

* another case
2023-03-12 21:41:48 -04:00
J. Nick Koston c41f91be89
Deduplicate entity_id in the states table (#89557) 2023-03-12 10:01:58 -10:00
J. Nick Koston 8bd43760b6
Deduplicate event_types in the events table (#89465)
* Deduplicate event_types in the events table

* Deduplicate event_types in the events table

* more fixes

* adjust

* adjust

* fix product

* fix tests

* adjust

* migrate

* migrate

* migrate

* more test fixes

* more test fixes

* fix

* migration test

* adjust

* speed up

* fix index

* fix more tests

* handle db failure

* preload

* tweak

* adjust

* fix stale docs strings, remove dead code

* refactor

* fix slow tests

* coverage

* self join to resolve query performance

* fix typo

* no need for quiet

* no need to drop index already dropped

* remove index that will never be used

* drop index sooner as we no longer use it

* Revert "remove index that will never be used"

This reverts commit 461aad2c52.

* typo
2023-03-11 14:54:55 -05:00
J. Nick Koston 170a13302c
Reduce overhead to store context ids in the database (#88942) 2023-03-08 14:51:45 -10:00
epenet c51bde9a26
Fail CI on lingering tasks (#88905) 2023-03-07 11:35:48 +01:00
Jan Bouwhuis 4e66554298
Also set `hass.config_entries` when `mock_hass_config` fixture is used (#88669)
* Set `hass.config_entries` with `mock_hass_config`

* Update tests/conftest.py

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-28 11:14:04 +01:00
Jan Bouwhuis b25f6e3ffc
Prepare for refactoring of MQTT related tests (#88557)
* Update mqtt_mock

* Tests manual_mqtt

* Tests mqtt_json

* Tests mqtt_room
2023-02-27 13:54:56 +01:00
Jan Bouwhuis 3afc39dbbf
Set default for `hass_config_yaml` fixture to "" (#88608)
Set default for hass_config_yaml fixture to ""
2023-02-22 17:18:11 +01:00
Erik Montnemery 356c316b39
Fix stray prints seen inbetween tests (#88570) 2023-02-21 17:19:38 -06:00
Jan Bouwhuis ebb450c946
Default `hass_config` to contain an empty config (#88515)
* Default hass_config to {}

* Correct type hint
2023-02-21 08:48:44 +01:00
Jan Bouwhuis 4f6a25b470
Allow parameterizing YAML config in tests (#87981)
* Add fixture to parameterize yaml config

* Apply to more tests

* Re-add @fixture label

* Add fixtures to patch yaml content and targets

* Typo

* Improve docstr

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

* Update references to mock_yaml_configuration

* Apply new fixtures

* Apply to check_config tests

* Follow up comments

* Rename fixtures, update docstr

* Split paths

* Patch load_yaml_config_file instead

* sort

* Fix tests

* improve docst

* Rename fixtures

* sorting

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

* Improve docstr

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

* Improve docstr

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

* Improve docstr

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

* Improve docstr

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Improve docstr

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Improve docstr

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-20 16:57:12 +01:00
Erik Montnemery 06213ee595
Drop sqlachemy_utils workaround (#88393) 2023-02-18 09:18:23 -06:00
Franck Nijhof 6891eb7ed1
Add support for snapshot testing (#88323)
* Add support for snapshot testing

* Use snapshots in Elgato diagnostics test

* Use snapshots in Elgato sensor test

* Fix flake8 warning

* Slightly improve serialized output

* Remove snapshot naming in elgato sensor tests

* Improve snapshoting of via_device_id in device registry item

* Update pylint typehints plugin for snapshot fixture typing

* Use snapshots in Elgato configflow test

* Use snapshots in Bluetooth repair issue tests
2023-02-17 16:35:55 -05:00
epenet a16e298599
Adjust json imports in tests (#88248) 2023-02-17 19:13:48 +01:00
J. Nick Koston c79157208b
Add python 3.11 to the CI (#88038)
* Remove profiler.memory service

guppy3 is not python3.11 compat
https://github.com/zhuyifei1999/guppy3/issues/41

This service will return if and when guppy3 becomes
python3.11 compat

* squash

* temp remove

* temp dump tests

* temp dump tests

* drop a few more to get a run

* drop a few more to get a run

* Account for changed python3.11 enum.IntFlag behavior in zha

There may be additional changes needed, but I could only
see what needed to be updated based on the tests

* merge

* restore

* restore

* legacy value

* tweak a bit for the python 3.11 timings

* block cchardet

* conditional

* adjust est

* test

* not yet

* tweak

* give a little leeway for timing

* Fix otbr tests

* Increase database test timeout

It looks like we need a little more time to run
with the addiitonal tests in #87019

* Increase database test timeout

It looks like we need a little more time to run
with the addiitonal tests in #87019

* Fix aprs tests with python 3.11

* merge fix

* hints

* Update homeassistant/package_constraints.txt

* Update script/gen_requirements_all.py

* Constrain uamqp for Python 3.10 only

* Bump vulcan-api to 2.3.0

see https://github.com/kapi2289/vulcan-api/pull/126
see https://github.com/home-assistant/core/pull/88038
see https://github.com/home-assistant/docker/pull/260

* add ban

* Bump python-matter-server to 2.1.1

* revert

* Update tests/asyncio_legacy.py

---------

Co-authored-by: Erik <erik@montnemery.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
2023-02-16 12:38:32 -05:00
Jan Bouwhuis 950ee34514
Correct typing on hass_storage fixure (#87986)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-13 12:12:34 +01:00
epenet b7b82b1e3f
Add more type hints to conftest.py (#87842)
* Add more type hints in conftest.py

* Adjust stop_hass

* Adjust mock_integration_frame

* Adjust pylint plugin
2023-02-11 13:48:53 +01:00
epenet 6a1cd75a67
Add MockHAClientWebSocket test helper (#87832)
* Add MockHAClientWebSocket test helper

* Add sample use

* Add missing type hint
2023-02-10 10:23:26 -05:00
epenet 22bfb99db4
Add type hints to requests_mock (#87757) 2023-02-10 11:44:09 +01:00
epenet fac746c974
Improve recorder type hints in tests (#87826)
* Improve recorder type hints in tests

* Add comment

* Adjust comment
2023-02-10 11:11:39 +01:00
J. Nick Koston cbaf4764e7
Ensure MySQL tests cleanup connections and raise an exception if they do not (#87767)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Erik <erik@montnemery.com>
2023-02-09 16:27:53 -06:00
Erik Montnemery 2fae82a9ef
Really ensure recorder test fixture is setup before hass fixture (#87796) 2023-02-09 11:43:14 -06:00
J. Nick Koston c05a7b29e6
Terminate stale MySQL connections at the end of test runs (#87794) 2023-02-09 11:13:13 -06:00
epenet c946f684bc
Add more type hints to conftest (#87755)
* Add pytest type hints to conftest

* Add bluetooth and integration frame
2023-02-09 09:20:05 +01:00
epenet aff0174afa
Add more type hints to conftest (#87737) 2023-02-08 22:58:00 +01:00
Franck Nijhof 6551eb168d
Add common area, device, entity and issue registry test fixtures (#87694) 2023-02-08 16:28:44 +01:00
Erik Montnemery 94519de8dd
Upgrade SQLAlchemy to 2.0.2 (#86436)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-08 08:17:32 -06:00
epenet a4c4f77f73
Add more fixtures to pylint plugin (#87685) 2023-02-08 10:51:09 +01:00
Erik Montnemery 720f51657d
Add CI job which runs recorder tests on PostgreSQL (#80614)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-07 09:46:14 -06:00
Jan Bouwhuis 4ad386d794
Correct type hints mqtt_client_mock and move new generator type (#87527)
* Correct mqtt_client_mock and move MqttMockType

* Rename MqttMockType to MqttMockGenerator

* Make types more specific

* adjust returntype _setup_mqtt_entry

* Correct return type _setup_mqtt_entry

* Update tests/conftest.py

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

* Update tests/conftest.py

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-06 15:05:06 +01:00
Jan Bouwhuis 97de0c6d9a
Late review on added type hint MQTT fixture (#87342) 2023-02-03 22:22:52 +01:00
Jan Bouwhuis 3edfd10f2d
Add type hints for MQTT common helper and fixtures (#87065) 2023-02-03 19:27:46 +01:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
epenet 7db166b515
Fix tests typing helper (#86956) 2023-01-31 08:48:35 +01:00
Franck Nijhof 3b5fd4bd06
Enable Ruff TRY004 (#86811) 2023-01-30 14:06:52 +01:00
epenet 7e7a27f8b9
Add type hints to http client fixtures (#86795) 2023-01-30 13:40:07 +01:00
Franck Nijhof 8f74bff354
Enable Ruff PLC0414 (#86799) 2023-01-27 16:32:04 +01:00
Franck Nijhof ef800335fb
Enable Ruff PT022 (#86792)
* Enable Ruff PT022

* Adjust found cases
2023-01-27 13:57:06 +01:00
Franck Nijhof bfbf9b9751
Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
epenet 30bf0634fe
Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
Joakim Plate 53b931e21a
Don't interpret negative verbosity as debug (#86318)
* Don't interpret negative verbosity as debug

CI run with -qq which is a negative verbosity

* Make sure all caplog tests get debug level

* Update tests/conftest.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-01-22 00:03:57 +02:00
Erik Montnemery d94f007dbf
Import recorder locally in test fixtures (#86286) 2023-01-20 14:22:48 +01:00
Franck Nijhof 24fdd588fd
Code styling tweaks to the tests - Part 1 (#86192) 2023-01-20 13:52:46 +01:00
J. Nick Koston 551e098177
Make event.time_tracker_utcnow patchable with freezegun (#86051) 2023-01-17 09:47:31 +01:00
Ville Skyttä 7eb1b8c2fe
Address a few deprecation warnings in tests (#85472) 2023-01-09 00:52:05 +02:00
J. Nick Koston d81febd3f4
Small speed up to frequently called datetime functions (#85399) 2023-01-08 09:42:29 -10:00
Erik Montnemery 6490dcf099
Import mqtt and recorder locally in test fixtures (#85067) 2023-01-03 20:18:36 +01:00
Joakim Plate 987e77780a
Only run garbage collection per module (#84681)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-01-02 09:31:12 -10:00
Joakim Plate cb982294bd
Avoid logging increase during tests (#84672) 2022-12-28 22:12:25 +01:00
Joakim Plate 94a02e7613
Switch to orjson for tests (#84674) 2022-12-28 03:36:58 +01:00
J. Nick Koston 9008006ac8
Restore remote discovered devices between remote scanner restarts (#83699) 2022-12-11 09:02:55 -10:00
Joakim Plate c196fefe31
Reduce log level for linger task/timer (#83703)
We don't need to warn that loudly for these issues.
2022-12-10 12:12:56 +01:00
Joakim Plate c576a68d33
Upgrade pytest-aiohttp (#82475)
* Upgrade pytest-aiohttp

* Make sure executors, tasks and timers are closed

Some test will trigger warnings on garbage collect, these warnings
spills over into next test.

Some test trigger tasks that raise errors on shutdown, these spill
over into next test.

This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.

Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309

* Replace loop with event_loop

* Make sure time is frozen for tests

* Make sure the ConditionType is not async

  /home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    def wrapper(*args, **kwargs):
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

* Increase litejet press tests with a factor 10

The times are simulated anyway, and we can't stop the normal
event from occuring.

* Use async handlers for aiohttp

tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
  /Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
    warnings.warn(

* Switch to freezegun in modbus tests

The tests allowed clock to tick in between steps

* Make sure skybell object are fully mocked

Old tests would trigger attempts to post to could services:

```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```

* Fix sorting that broke after rebase
2022-11-29 22:36:36 +01:00
Erik Montnemery f869ce9d06
Validate common statistics DB schema errors on start (#79707)
* Validate common statistics db schema errors on start

* Fix test

* Add tests

* Adjust tests

* Disable statistics schema validation in tests

* Update after rebase
2022-11-29 10:16:08 +01:00
J. Nick Koston d6e287f47a
Add manufacturer and model to bluetooth adapter device (#82769)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-11-27 15:44:44 -05:00
J. Nick Koston 47c66dbed4
Offload platform specific bluetooth code to bluetooth-adapters (#82196)
* Offload platform specific bluetooth code to bluetooth-adapters

* adjust

* fix some more patch targets

* more test fixes

* almost there

* may not be setup yet

* more fixes

* fixes

* fix test

* fix merge
2022-11-17 14:34:19 -05:00
Erik Montnemery f4951a4f31
Add CI job which runs recorder tests on MariaDB (#80586)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-10-19 13:04:28 +02:00
Erik Montnemery 31a787558f
Ensure recorder test fixture is setup before hass fixture (#80528)
* Ensure recorder test fixture is setup before hass fixture

* Adjust more tests
2022-10-19 07:58:47 +02:00
Erik Montnemery 416aad32cc
Don't mock out migration in recorder tests (#80480) 2022-10-17 22:17:08 +02:00
Erik Montnemery 4fcd0f3e23
Fix recorder fixtures (#79147) 2022-09-27 17:00:06 +02:00
Erik Montnemery e66f28f3f7
Teach sqlite3 about HAFakeDatetime (#78756) 2022-09-19 23:09:50 +02:00
J. Nick Koston 18eef5da1f
Restore history from bluetooth stack at startup (#78612) 2022-09-17 16:58:19 -05:00
Jan Bouwhuis 7fc294d9b1
Set cv hass in hass fixture (#77271)
* Set cv hass in hass fixture

* Move test_hass_cv and update docstring

* Update tests/test_test_fixtures.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-08-25 12:29:31 +02:00
J. Nick Koston f6a03625ba
Implement websocket message coalescing (#77238)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-08-24 22:50:48 -05:00
J. Nick Koston cd59d3ab81
Add support for multiple Bluetooth adapters (#76963) 2022-08-18 21:41:07 -04:00
J. Nick Koston 3bcc274dfa
Rework bluetooth to support scans from multiple sources (#76900) 2022-08-17 10:51:56 -10:00
J. Nick Koston 6f3cdb6db1
Reorganize bluetooth integration to prepare for remote and multi-adapter support (#76883) 2022-08-16 14:52:53 -10:00
J. Nick Koston a813cf987b
Add bluetooth options flow to pick the adapter (#75701) 2022-07-25 16:52:35 +02:00
J. Nick Koston 38bccadaa6
Add support for setting up and removing bluetooth in the UI (#75600)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-07-22 13:19:53 -05:00
Erik Montnemery fd6ffef52f
Support non-live database migration (#72433)
* Support non-live database migration

* Tweak startup order, add test

* Address review comments

* Fix typo

* Clarify comment about promoting dependencies

* Tweak

* Fix merge mistake

* Fix some tests

* Fix additional test

* Fix additional test

* Adjust tests

* Improve test coverage
2022-07-22 15:11:34 +02:00
Erik Montnemery 9d0a252ca7
Improve handling of MQTT config entry data (#72691)
* Improve handling of MQTT config entry data

* Add test

* Add warning

* Adjust tests
2022-07-22 13:36:43 +02:00
J. Nick Koston a3c1926da5
Add mock_bluetooth fixture (#75075) 2022-07-14 07:40:17 -05:00
J. Nick Koston 08ff1b8986
Fix flapping system log test (#75111) 2022-07-14 11:05:52 +02:00
Jan Bouwhuis 52561ce076
Update MQTT tests to use the config entry setup (#72373)
* New testframework and tests for fan platform

* Merge test_common_new to test_common

* Add alarm_control_panel

* Add binary_sensor

* Add button

* Add camera

* Add climate

* Add config_flow

* Add cover

* Add device_tracker_disovery

* Add device_trigger

* Add diagnostics

* Add discovery

* Add humidifier

* Add init

* Add lecacy_vacuum

* Add light_json

* Add light_template

* Add light

* Add lock

* Add number

* Add scene

* Add select

* Add sensor

* Add siren

* Add state_vacuum

* Add subscription

* Add switch

* Add tag

* Add trigger

* Add missed tests

* Add another missed test

* Add device_tracker

* Remove commented out code

* Correct tests according comments

* Improve mqtt_mock_entry and recover tests

* Split fixtures with and without yaml setup

* Update fixtures manual_mqtt

* Update fixtures mqtt_json

* Fix test tasmota

* Update fixture mqtt_room

* Revert fixture changes, improve test

* re-add test
2022-06-02 14:24:46 +02:00
Jan Bouwhuis ed1c2ea2b8
Move manual configuration of MQTT fan and light to the integration key (#71676)
* Processing yaml config through entry setup

* Setup all platforms

* Update homeassistant/components/mqtt/__init__.py

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

* adjust mock_mqtt - reference config from cache

* Fix test config entry override

* Add tests yaml setup

* additional tests

* Introduce PLATFORM_SCHEMA_MODERN

* recover temporary MQTT_BASE_PLATFORM_SCHEMA

* Allow extra key in light base schema, restore test

* Fix test for exception on platform key

* One deprecation message per platform

* Remove deprecation checks from modern schema

* Update homeassistant/components/mqtt/fan.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/fan.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/light/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/light/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/light/schema_json.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/light/schema_template.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* rename validate_modern_schema

* Do not fail platform if a single config is broken

* Update homeassistant/components/mqtt/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Fix tests on asserting log

* Update log. Make helper transparant, remove patch

* Perform parallel processing

* Update tests/components/mqtt/test_init.py

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

* Apply suggestions from code review

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

* Update homeassistant/components/mqtt/mixins.py

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

* black

* Fix tests and add #new_format anchor

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-19 15:04:53 +02:00
J. Nick Koston 222baa53dd
Make database access in the eventloop raise an exception (#71547) 2022-05-09 15:22:08 -05:00
Erik Montnemery f96c1136b0
Bump pytest-socket to 0.5.1 (#69624)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-26 10:42:37 -10:00
Erik Montnemery 3016b5fbfc
Use recorder fixtures and helpers in tests (#70773) 2022-04-26 06:08:00 -10:00
Erik Montnemery 28ebab9c5a
Simplify waiting for recorder in tests (#70647) 2022-04-25 12:04:47 +02:00
Erik Montnemery 982e314de6
Use recorder_mock in tests (#70363)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-22 19:29:44 -10:00
J. Nick Koston 23de8d4156
Revert changes to test/conftest.py from #70300 (#70385) 2022-04-21 10:49:47 -10:00
J. Nick Koston 309424d3b9
Prevent tests changing units from affecting other tests (#70300)
* Prevent tests changing temperature_unit from affecting other tests

* tweak
2022-04-19 11:38:52 -10:00
J. Nick Koston fe6a4bfb1d
Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC (#69643)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-09 09:05:54 -10:00
Erik Montnemery 7e8d52e5a3
Fix race when handling rapid succession of MQTT discovery messages (#68785)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-03-29 20:26:11 -07:00
Marc Mueller c9cc2eb7c8
Fix flaky datetime test (#68524) 2022-03-23 09:30:01 +01:00
Erik Montnemery 247af2e74f
Improve recorder setup in tests (#68333)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-03-21 15:49:18 -07:00
Erik Montnemery cf4033b1bc
Simplify time zone setting in tests (#68330)
* Simplify timezone setting in tests

* Fix typo

* Adjust caldav tests

* Adjust input_datetime tests

* Adjust time_date tests

* Adjust tod tests

* Adjust helper tests

* Adjust recorder tests

* Adjust risco tests

* Adjust aemet tests

* Adjust flux tests

* Adjust forecast_solar tests

* Revert unnecessary change in forecast_solar test

* Adjust climacell tests

* Adjust google tests

* Adjust sensor tests

* Adjust sonarr tests

* Adjust template tests

* Adjust zodiac tests

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-20 10:25:15 +01:00
Erik Montnemery d360ac91ca
Disable recorder nightly jobs in tests (#68188) 2022-03-15 09:23:52 -07:00
Erik Montnemery 98982c86e4
Add MQTT diagnostics (#66730)
* Add MQTT diagnostics

* Redact device tracker location

* Adjust tests

* Address comments from code review
2022-02-18 09:28:49 +01:00
Erik Montnemery fe38e6ba87
Drop MQTT import flow (#66160)
* Drop MQTT import flow

* Reload manually configured MQTT entities when config entry is setup

* Address review comments

* Actually remove the import flow
2022-02-10 21:09:57 +01:00
Paulus Schoutsen 63f8e437ed
Add Home Assistant Content user (#64337) 2022-01-21 10:06:39 -08:00
Stefan Agner a13ae85982
Introduce only_supervisor for @websocket_api.ws_require_user() (#61298) 2021-12-08 16:49:35 -08:00
epenet c05eca1c82
Remove log flooding prevention logic from discovery info (#61243)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 10:28:26 -10:00
J. Nick Koston 347c4ea137
Bump zeroconf to 0.37.0 (#59932) 2021-11-18 20:23:20 -08:00