Commit Graph

15419 Commits (fccdd7b102376622ae19ac1b45215b9184c19e73)

Author SHA1 Message Date
Martin Hjelmare 33b16d20b1
Clean up tradfri import flow (#88588) 2023-02-22 10:53:48 +01:00
Chris Xiao 93c681ae58
Add options flow for met (#88525)
* implement options flow for met

* add tests for met options flow

* fix met options flow tests

* fix met options flow when tracking home
2023-02-22 10:18:58 +01:00
epenet aa20c902db
Add typed helpers and improve type hints in util/json (#88534)
* Add type hints to load_json

* Adjust ios

* Adjust nest

* Add use of load_json_array

* Add tests

* Adjust test patch

* Add test_load_json_os_error
2023-02-22 10:09:28 +01:00
J. Nick Koston e38836b6e1
Update async_matching_config_entries to use async_get_integrations (#88527)
* Update async_matching_config_entries to use async_get_integrations

* Update homeassistant/components/config/config_entries.py

* Update homeassistant/components/config/config_entries.py
2023-02-21 21:17:18 -05:00
J. Nick Koston 5bc0636905
Replace fire_coroutine_threadsafe with asyncio.run_coroutine_threadsafe (#88572)
fire_coroutine_threadsafe did not hold a reference to the asyncio
task which meant the task had the risk of being prematurely
garbage collected
2023-02-21 21:16:18 -05:00
Maciej Bieniek a54e523731
Bump `nettigo-air-monitor` to version 2.1.0 (#88569)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-21 17:41:46 -06:00
Erik Montnemery 356c316b39
Fix stray prints seen inbetween tests (#88570) 2023-02-21 17:19:38 -06:00
J. Nick Koston 93e37243f6
Fix logbook test that failed to exclude EVENT_HOMEASSISTANT_FINAL_WRITE (#88568) 2023-02-21 16:22:44 -06:00
Franck Nijhof 3501a9788f
Update entity registry snapshot serializer (#88566)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-21 22:37:13 +01:00
Jan Bouwhuis 3f79155df6
Remove deprecated callback support for MQTT subscribe (#88543)
* Remove deprecated callback support and fix tests

* Add note with removal instruction
2023-02-21 22:21:00 +01:00
J. Nick Koston e6c792deed
Add missing kelvin attributes to light recorder platform (#88561) 2023-02-21 14:23:53 -06:00
J. Nick Koston ff93b7a01c
Restore vulcan integration (#88556) 2023-02-21 20:56:36 +01:00
Erik Montnemery 0c4c95394e
Add WS command config/entity_registry/list_for_display (#87787)
* Add WS command config/entity_registry/list_for_display

* Make more keys in the display dict optional

* Move disabled_by check to ws command handler

* Hide hidden_by if not hidden

* Use send_json_auto_id in the new test

* Don't include entities which have no data needed for display

* Include platform for entries with translation_key
2023-02-21 20:40:39 +01:00
Teemu R a93b4e7197
Use device-native kelvins for tplink color temperature (#85646) 2023-02-21 12:52:50 -06:00
Jc2k ce1ef1d720
Activate thread integration if thread border routers are present (#88551) 2023-02-21 16:22:00 +00:00
Jorgen Evens 4e32b65694
Improve pjlink reliability (#80745)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-02-21 16:48:53 +01:00
epenet a51cc75f03
Add type hints to core tests (part 2) (#88492) 2023-02-21 09:27:13 +01:00
epenet a102883eff
Add type hints to integration tests (part 2) (#88493) 2023-02-21 09:25:05 +01: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
Raman Gupta 8722f5b42b
Bump zwave-js-server-python to 0.46.0 (#88520) 2023-02-21 07:15:55 +01:00
Luke 84763c793d
Support Ecobee climate Aux Heat on/off (#86100)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-20 17:56:03 -06:00
J. Nick Koston 35adb2f7e8
Remove previously deprecated Detected Object from unifiprotect (#85656) 2023-02-20 22:14:01 +01:00
Carlos Gustavo Sarmiento fa2e7aa592
Add `state_class = MEASUREMENT` to Derivative sensor (#88408)
* Add `state_class = MEASUREMENT` to Derivative sensor

One line change per title.

* Update sensor.py

* Update tests for Derivative Sensor
2023-02-20 21:57:58 +01:00
J. Nick Koston ecf87ae979
Improve performance of websocket_api dispatch (#88496)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-02-20 19:51:34 +01:00
Erik Montnemery cc4a179ca8
Support templating for in state conditions (#88411) 2023-02-20 18:57:00 +01:00
emanuelst 0b81c836ef
Update HomeKit VOC mappings (#87663)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-20 11:56:41 -06:00
Michael Hansen 5bf3a0b7af
Load custom sentences for language variations (en-us, etc.) (#88498) 2023-02-20 12:28:04 -05:00
Maciej Bieniek 7119a0f811
Use `suggested_display_precision` instead of rounding in Shelly sensor platform (#87084) 2023-02-20 10:20:52 -06: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
Matthias Alphart 6a0ea09f29
Upload KNX Keyfile from Config/Options Flow directly (#88097)
* Manage KNX Keyfile from UI

* migrate config entry to use new keyfile

* Revert "migrate config entry to use new keyfile"

use same config style as before instead of entry version migration

* clean up uploaded file when integration is removed

* change default filename

* revert to previous step name

* remove empty directory on unload
2023-02-20 14:48:56 +01:00
J. Nick Koston 9876dd804e
Exclude event_id and event_score from being recorded in unifiprotect (#88387) 2023-02-20 14:09:56 +01:00
Franck Nijhof 36e59fc322
Cleanups in WLED tests (#88480) 2023-02-20 13:00:02 +01:00
epenet ec5c3d6330
Add type hints to integration tests (#88476) 2023-02-20 11:43:51 +01:00
epenet 5f25b71df7
Add type hints to core tests (#88478) 2023-02-20 11:42:56 +01:00
Yuxin Wang ba2e80f741
Add more tests for APC UPS Daemon integration (#85967)
* Add tests for init.

* Add more test init.

* Fix test init side_effect.

* Add test sensor.

* Fix sensor test file name.

* Fix sensor test.

* Add binary sensor test.

* Fix comments and styling.

* Remove apcupsd from omissions in coveragerc.

* Add a test case for binary sensor when STATFLAG is not available.

* Complete type annotations for test files.

* Revert "Remove apcupsd from omissions in coveragerc."

This reverts commit 66b05fcb8829619a771a650a3d70174089e15d91.
2023-02-20 09:51:01 +01:00
jan iversen b11539fb04
Move connect method into a task (#88452)
Move connect() into a task.
2023-02-20 08:32:47 +01:00
epenet 488d78571e
Add missing device class triggers (#88316)
* Add constant tests for sensor device classes

* Add missing strings

* Adjust tests

* Add missing conditions

* Add missing trigger

* Cleanup
2023-02-20 08:30:51 +01:00
Paulus Schoutsen 69e42d0e4d
Fix Vulcan break CI (#88469)
* Fix Vulcan break CI

* Remove unrelated change

* Flake8 ignore
2023-02-19 23:49:42 -05:00
J. Nick Koston c2b770bcb9
Load pending state attributes and event data ids at startup (#88444)
* Load pending state attributes and event data ids at startup

Since we queue all events to be processed after startup
we can have a thundering herd of queries to prime the
LRUs of event data and state attributes ids. Since we
know we are about to process a chunk of events we can
fetch all the ids in two queries

* lru

* fix hang

* Fix recorder LRU being destroyed if event session is reopened

We would clear the LRU in _close_event_session but
it would never get replaced with an LRU again so
it would leak memory if the event session is reopened

* Fix recorder LRU being destroyed if event session is reopened

We would clear the LRU in _close_event_session but
it would never get replaced with an LRU again so
it would leak memory if the event session is reopened

* cleanup
2023-02-19 21:26:38 -05:00
Franck Nijhof c4f92f5ad4
Cleanup use of test fixtures in LaMetric tests (#88453)
Cleanup use of test fixture in LaMetric tests
2023-02-19 21:15:07 -05:00
Franck Nijhof 172d505314
Refactor Whois tests (#88456) 2023-02-19 21:14:10 -05:00
Franck Nijhof 037b3ebd26
Refactor EnergyZero tests (#88458) 2023-02-19 21:11:05 -05:00
J. Nick Koston 3533e77ec9
Fix using MariaDB slow range select workaround with Postgresql (#88459)
* Mark PostgreSQL range select as fast

Currently we were using the slow range select workaround for
PostgreSQL that was original developed for MariaDB but
its actually slower on PostgreSQ

fixes #83253

* Mark PostgreSQL range select as fast

Currently we were using the slow range select workaround for
PostgreSQL that was original developed for MariaDB but
its actually slower on PostgreSQ

fixes #83253
2023-02-19 21:08:43 -05:00
Franck Nijhof 68e1aaa0be
Refactor Elgato tests (#88376) 2023-02-19 20:14:18 +01:00
J. Nick Koston a9731a7b26
Make the recorder LRU adjustment threadsafe (#88443) 2023-02-19 19:30:08 +01:00
J. Nick Koston 9df00bd285
Adjust recorder LRU cache to align with the number of entities (#88350)
* Adjust size of recorder LRU based on number of entities

If there are a large number of entities the cache would
get thrashed as there were more state attributes being
recorded than the size of the cache. This meant we had
to go back to the database to do lookups frequently when
an instance has more than 2048 entities that change
frequently

* add a test

* do not actually record 4096 states

* patch target

* patch target
2023-02-19 00:02:36 -05:00
Teemu R 1d928f05fa
Update python-kasa to 0.5.1 (#88416) 2023-02-18 22:39:08 -06:00
Franck Nijhof 6cbad61572
Enable Ruff RUF006; Hard reference to asyncio.create_task return value (#88216)
* Enable Ruff RUF006

* Fix test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-18 23:05:44 -05:00
J. Nick Koston 3ca9f3c0d5
Only build the recorder SupportedDialect enum once (#88402)
Every call to dialect_name was creating a new enum object
in the recorder
2023-02-18 20:21:14 -05:00
Erik Montnemery 06213ee595
Drop sqlachemy_utils workaround (#88393) 2023-02-18 09:18:23 -06:00
Tom Harris d84fde8c54
Insteon scenes (#87803)
* Add Insteon scene support

* Bump to pyinsteon 1.3.1

* Add tests

* Bump Insteon Panel to 0.3.1

* Change docstring
2023-02-18 15:52:49 +01:00
epenet 1128041899
Add type hints to integration tests (zwave_js) (#88311) 2023-02-18 14:59:26 +01:00
Franck Nijhof 31061b9f35
Fix snapshots testing repr 0 value IntFlags (#88379) 2023-02-18 07:38:19 -06:00
Erik Montnemery 83e5bf7ae8
Use entity_sources to determine integration in recorder platforms (#88382) 2023-02-18 07:21:41 -06:00
Guido Schmitz 1279868bf5
Bump devolo_plc_api to 1.2.0 (#88348) 2023-02-18 13:34:26 +01:00
Jon Caruana e5e551f4ea
Code quality/test improvement to available attributes of LiteJet (#86683)
* PR feedback, and add related tests.

* PR feedback.

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-18 12:43:32 +01:00
J. Nick Koston 289bab6f87
Make recorder platform attribute exclude integration aware (#88357) 2023-02-18 10:08:59 +01:00
Franck Nijhof 1e05697080
Enable Ruff B007 (#88356)
* Enable Ruff B007

* Adjust existing cases
2023-02-17 21:08:18 -05:00
modrisb 9fd35d53e7
Change core return code processing (#88326)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-17 20:56:02 -05: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
Michael Hansen 325674ec44
Only expose default cloud domains in Assist default agent (#88274)
* Only expose default cloud domains in default agent

* Copy exposed domain list to conversation

* Implement requested changes

* Add test for exposed devices/areas
2023-02-17 16:19:22 -05:00
J. Nick Koston 331102e592
Dismiss discoveries when the underlying device disappears (#88340)
* Implement discovery removals

Bluetooth, HomeKit, SSDP, and Zeroconf now implement
dismissing discoveries when the underlying discovered
device disappears

* cover

* add zeroconf test

* cover

* cover bluetooth

* fix rediscover
2023-02-17 15:51:19 -05:00
Paulus Schoutsen 3a32d2bdcb
Add background tasks to config entries (#88335)
* Use a set for config entries task tracking

* Allow adding background tasks to config entries

* Add tests for config entry add tasks

* Update docstrings on core create task

* Migrate roon and august

* Use in more places

* Guard for None
2023-02-17 13:50:05 -05:00
epenet a16e298599
Adjust json imports in tests (#88248) 2023-02-17 19:13:48 +01:00
epenet 7427d4f323
Add type hints to integration tests (zha) (#88309) 2023-02-17 18:54:26 +01:00
epenet 185cd61cbd
Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
epenet 0a80ac19bc
Add type hints to integration tests (part 18) (#88174) 2023-02-17 18:45:48 +01:00
Paulus Schoutsen f465561536
Fix dangling task for cast (#88285) 2023-02-17 18:43:40 +01:00
dcmeglio da046f93f4
Add additional characteristics for Airversa Homekit Air Purifiers (#85660) 2023-02-17 15:55:31 +00:00
epenet 5b80b1f55a
Add type hints to integration tests (part 25) (#88308) 2023-02-17 16:52:28 +01:00
epenet 9a5f88f55f
Add type hints to integration tests (part 23) (#88235) 2023-02-17 16:40:46 +01:00
epenet aa50096a31
Add type hints to integration tests (part 24) (#88307) 2023-02-17 16:34:53 +01:00
Erik Montnemery 9989a4787b
Fix recorder platform tests (#88330) 2023-02-17 08:22:15 -06:00
Erik Montnemery 273d289e03
Fix sleepiq test to not contact the API (#88315)
* Fix sleepiq test to not contact the API

* Add an autosue fixture for config entry setup
2023-02-17 12:32:27 +01:00
J. Nick Koston b9f29c27ab
Cleanup stale recorder code (#88275)
- Removes dead commit function
- Small cleanup to debug handling in execute
2023-02-16 23:12:11 -05:00
Paulus Schoutsen 6cab27f378
Add support for background tasks in HA (#88265)
* Add support for background tasks

* make name mandatory for background tasks

* Update docstring

* async_create_background_task

* Grammar
2023-02-16 20:39:29 -05:00
J. Nick Koston 2ce631733a
Switch ld2410_ble to use no_devices_found (#88270) 2023-02-16 22:52:57 +01:00
J. Nick Koston a059cd7f80
Switch keymitt_ble to use no_devices_found (#88271)
* Switch keymitt_ble to use no_devices_found

* Switch keymitt_ble to use no_devices_found
2023-02-16 22:52:29 +01:00
J. Nick Koston 06b1bf9c92
Switch led_ble to use no_devices_found (#88269) 2023-02-16 22:51:57 +01:00
J. Nick Koston ffa7cac38e
Switch switchbot to use no_devices_found (#88268) 2023-02-16 22:51:27 +01:00
J. Nick Koston b2a1df19a0
Switch yalexs_ble to use no_devices_found (#88267) 2023-02-16 22:50:49 +01:00
epenet 3873484849
Refactor json tests to align with new code (#88247)
* Refactor json tests to align with new code

* Use tmp_path
2023-02-16 21:34:19 +01:00
Michael Hansen dc30210237
Use blocking in intent service calls and verify results (#88035)
* Use blocking in service calls and verify result

* Block for 2 seconds and update states after

* Small timeout in service call to allow exceptions

* Move sun test
2023-02-16 14:01:41 -05:00
epenet 8c821c8969
Add JSON support to load_fixture (#88076)
* Add JSON support to load_fixture

* More tests

* Remove lru_cache on load_json
2023-02-16 19:40:47 +01:00
Paulus Schoutsen bc2b35765e
Stop processing when we hit bad encryption in mobile app (#88150)
* Stop processing when we hit bad encryption

* Accept webhook payload that is a list

* Rename functions because we import them

* Revert a debug thing

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-16 13:05:16 -05:00
Jan Bouwhuis 57738fbb8c
Replace deprecated SSLContext constant PROTOCOL_TLS in mqtt (#88214)
Replace deprecated SSLContext constants
2023-02-16 13:01:28 -05: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
J. Nick Koston d2277fa6db
Fix restore of MQTT subscriptions from reload (#88220) 2023-02-16 11:14:26 -06:00
epenet 88cfbf6a34
Add type hints to integration tests (part 22) (#88234) 2023-02-16 14:08:03 +01:00
epenet ba23816a0c
Inverse json import logic (#88099)
* Fix helpers and util

* Adjust components

* Move back errors

* Add report

* mypy

* mypy

* Assert deprecation messages

* Move test_json_loads_object

* Adjust tests

* Fix rebase

* Adjust pylint plugin

* Fix plugin

* Adjust references

* Adjust backup tests
2023-02-16 11:37:57 +01:00
epenet dab8557951
Add type hints to integration tests (part 21) (#88233) 2023-02-16 11:15:26 +01:00
Brandon Rothweiler 0748e12341
Fix capitalization of OwnTone integration (#88219) 2023-02-16 10:16:32 +01:00
J. Nick Koston c83ea297b5
Refactor zeroconf task handling (#88204)
* Refactor zeroconf task handling

- Avoid the need to create tasks for most callbacks
- Fixes the untracked task that could get unexpectedly GCed

* be consistant

* be consistant

* fix zeroconf tests

* runtime

* Revert "runtime"

This reverts commit 19e6b61837.

* precalc

* refactor

* tweak

* update tests
2023-02-15 21:44:11 -05:00
J. Nick Koston c0e22be7a8
Fix allowing identical flows to be created before startup (#88213)
The check for identical flows only worked after
the start event. We now check against pending
flows as well

If startup took a while we could end up
with quite the thundering herd
2023-02-15 21:36:00 -05:00
Franck Nijhof d3ed8de232
Update Ruff to v0.0.247 (#88210)
* Update Ruff to v0.0.247

* Fix new found violations
2023-02-15 16:46:03 -05:00
Marcel van der Veldt dfe0ededa0
Bump python-matter-server to 2.1.0 (#88192)
* Bump python-matter-server to 2.1.0

* Fix tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-15 13:23:03 -05:00
J. Nick Koston c8b827b46b
Fix aprs tests with python 3.11 (#88189)
* Fix aprs tests with python 3.11

* hints
2023-02-15 13:03:48 -05:00
Erik Montnemery 80e2f96097
Add WS command thread/delete_dataset (#88077)
* Add WS command thread/delete_dataset

* Return not_allowed when trying to delete the preferred dataset
2023-02-15 12:55:10 -05:00
J. Nick Koston 4221433ca6
Account for changed python3.11 enum.IntFlag 0 behavior in zha (#88144) 2023-02-15 11:40:48 -06:00
epenet 80ee196fd8
Add type hints to integration tests (part 19) (#88178) 2023-02-15 18:07:40 +01:00
Jc2k f5a05c1bd2
Support HomeKit Controller Thread Provisioning (#87809) 2023-02-15 16:41:07 +00:00
Jan Bouwhuis 03e9dff327
Allow resetting MQTT climate attributes and ignore empty values (#87936)
Allow reseting MQTT climate attributes
2023-02-15 16:31:49 +01:00
J. Nick Koston 61539686a4
Disable profiler.memory service with python 3.11 (#88136) 2023-02-15 16:20:47 +01:00
Erik Montnemery 6254200b37
Fix otbr tests (#88184) 2023-02-15 16:19:46 +01:00
mkmer 2af4d2152b
Honeywell disable detergent level by default (#88040)
* Disable fill by default

* Fix tests

* use TANK_FILL.get

* Remove None from attribute get
add reload to sensor test

* Typing
fix iteration error
2023-02-15 16:01:20 +01:00
Gertjan 66ba0cb1d3
Fixed float number validation in sensor component (#88074) 2023-02-15 15:53:44 +01:00
epenet 3a9adacdde
Add type hints to integration tests (part 20) (#88179) 2023-02-15 15:23:34 +01:00
Erik Montnemery 8613d60c5e
Add WS command for discovering Thread routers (#88021)
* Add WS command for discovering Thread routers

* Fix type annotations

* Mock zeroconf in tests

* Key discovery by external MAC address

* Add tests

* Include hostname in data, allow missing fields

* Fix typo

* Include server instead of hostname
2023-02-15 15:15:29 +01:00
epenet c7fc90f8a0
Adjust imports in rflink test_init (#88177) 2023-02-15 15:11:22 +01:00
Franck Nijhof f67ebcade1
Enable Ruff SIM201 (#88171) 2023-02-15 14:43:02 +01:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
J. Nick Koston 6f38bc274a
Fix netatmo with python 3.11 (#88093) 2023-02-15 14:02:33 +01:00
epenet b21bf8763e
Fix mobile app regression accepting sensor states (#88164)
* Fix mobile app regression accepting sensor states

* Adjust tests
2023-02-15 07:17:19 -05:00
Franck Nijhof 9030ca05b1
Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
epenet 2cdc741900
Add type hints to integration tests (part 17) (#88163) 2023-02-15 11:14:04 +01:00
Mike Heath 04e9c7748f
Support Fully Kiosk Browser device discovery via MQTT (#88109)
Support FKB device discovery via MQTT
2023-02-15 11:11:04 +01:00
epenet 88444b2e0c
Add type hints to integration tests (part 16) (#88008) 2023-02-15 10:50:02 +01:00
epenet 6c430e03bc
Add type hints to integration tests (part 14) (#88005) 2023-02-15 10:31:43 +01:00
Thomas Dietrich a0e0feb444
Statistics component fix device_class for incremental source sensors (#88096)
* Return None device_class for incremental source sensors

* Ignore linting error

* Fix ignore linting error

* Fix ignore linting error

* Fix ignore linting error

* Catch potential parsing error with enum
2023-02-15 10:22:09 +01:00
Maciej Bieniek 95bb019f71
Do not reload Shelly TRV entry when not needed (#88037)
* Do not reload the entry when the target temperature changes

* Do not reload the entry when the mode changes

* Increase test coverage

* Increase test coverage
2023-02-15 10:21:53 +01:00
Maciej Bieniek cd4ce86f07
Add support for `triple_push` event for Shelly gen2 devices (#88081)
* Add support for triple_push event

* Sort

* Fix tests
2023-02-15 10:20:27 +01:00
epenet 50cbabb2d8
Add type hints to integration tests (part 15) (#88006) 2023-02-15 10:00:49 +01:00
Jan Bouwhuis 6c23d6abfe
Fix doc string in mqtt test (#88138)
Fix docstr
2023-02-15 05:56:03 +01:00
Brandon Rothweiler 7cf5fd5952
Fix typo in OpenAI prompt (#88137) 2023-02-14 20:33:58 -05:00
J. Nick Koston 0c35c6a313
Fix enum try_parse test for python3.11 (#88131) 2023-02-14 15:29:44 -06:00
J. Nick Koston 44e8e808a1
Fix apprise tests for python 3.11 (#88126) 2023-02-14 15:25:25 -05:00
J. Nick Koston aaeb909148
Fix wemo tests with py3.11 (#88123) 2023-02-14 13:58:57 -06:00
J. Nick Koston 4d90d3cd91
Fix vera tests with python3.11 (#88124) 2023-02-14 13:58:44 -06:00
J. Nick Koston e7d5943c90
Fix zwave_me tests with python 3.11 (#88122) 2023-02-14 13:58:29 -06:00
Aaron Bach 6bb7a7225d
Revert "Add a calendar entity to Ridwell (#86117)" (#88106)
This reverts commit 16a5275461.
2023-02-14 10:23:32 -07:00
J. Nick Koston f237bb14ca
Add strict typing to yalexs_ble (#88086)
* Add strict typing to yalexs_ble

* Add strict typing to yalexs_ble

* Add strict typing to yalexs_ble
2023-02-14 11:38:51 -05:00
Teemu R 5335dfbc67
Prefer effect over other light settings for tplink (#85642) 2023-02-14 10:29:11 -06:00
J. Nick Koston c54500cb1f
Fix invalid spec in mqtt tests for py3.11 (#88092)
Fix invalid spec in mqtt tests

unittest.mock.InvalidSpecError: Cannot spec a Mock object.
2023-02-14 11:28:46 -05:00
Aaron Bach 16a5275461
Add a calendar entity to Ridwell (#86117) 2023-02-14 06:58:41 -07:00
Martin Hjelmare e1a5d5a749
Refactor tradfri sensor tests (#88026) 2023-02-14 13:35:27 +01:00
Matthias Alphart d7861e79c5
Update xknx to 2.5.0 (#88069) 2023-02-14 12:44:43 +01:00
Paulus Schoutsen fa5c60c9ee
Handle device reg fields not being valid data in openai conversion (#88047)
Handle device reg fields not being valid data
2023-02-14 11:45:27 +01:00
Paulus Schoutsen d54f59478f
Keep task references while running (#87970)
* Keep task references while running

* Update pilight tests pointing at correct logger call

* Fix graphite tests

* Fix profiler tests

* More graphite test fixes

* Remove extra sleep

* Fix tests

* Shutdown background tasks as part of stage 1

* Remove unnecessary sleep in test

* Remove unused method on mock hass

* Skip on cancelled too

* Remove background tasks

* Test trigger variables without actually sleeping

* Fix graphite

* One more graphite grrrrrrr
2023-02-13 23:16:59 -05:00
J. Nick Koston e41af8928b
Restore original aiohttp cancelation behavior (#88046) 2023-02-13 22:00:36 -06:00
dcmeglio 3d9d79684d
Add support for telnet connections for Denonavr integration (#85980)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-13 18:36:09 -06:00
epenet efef915fc7
Add mariadb 10.3.32 to database tests (#87741)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-13 16:28:39 -06:00
Erik Montnemery 4ca0a24f87
Increase test scope of MariaDB + PostgreSQL tests (#87019)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-13 15:58:13 -06:00
Martin Hjelmare ab2ab1573e
Refactor tradfri diagnostics tests (#88017) 2023-02-13 18:39:48 +01:00
Martin Hjelmare 8993a36e27
Refactor tradfri fan tests (#87999) 2023-02-13 15:40:21 +01:00
J. Nick Koston 03eea7bd3f
Avoid subprocess memory copy when c library supports posix_spawn (#87958)
* use posix spawn on alpine

* Avoid subprocess memory copy when c library supports posix_spawn

By default python 3.10 will use the fork() which has to
copy all the memory of the parent process (in our case
this can be huge since Home Assistant core can use
hundreds of megabytes of RAM). By using posix_spawn
this is avoided.

In python 3.11 vfork will also be available
https://github.com/python/cpython/issues/80004#issuecomment-1093810689
https://github.com/python/cpython/pull/11671 but we won't
always be able to use it and posix_spawn is considered safer
https://bugzilla.kernel.org/show_bug.cgi?id=215813#c14

The subprocess library doesn't know about musl though
even though it supports posix_spawn https://git.musl-libc.org/cgit/musl/log/src/process/posix_spawn.c
so we have to teach it since it only has checks for glibc
1b736838e6/Lib/subprocess.py (L745)

The constant is documented as being able to be flipped here:
https://docs.python.org/3/library/subprocess.html#disabling-use-of-vfork-or-posix-spawn

* Avoid subprocess memory copy when c library supports posix_spawn

By default python 3.10 will use the fork() which has to
copy memory of the parent process (in our case
this can be huge since Home Assistant core can use
hundreds of megabytes of RAM). By using posix_spawn
this is avoided and subprocess creation does not
get discernibly slow the larger the Home Assistant
python process grows.

In python 3.11 vfork will also be available
https://github.com/python/cpython/issues/80004#issuecomment-1093810689
https://github.com/python/cpython/pull/11671 but we won't
always be able to use it and posix_spawn is considered safer
https://bugzilla.kernel.org/show_bug.cgi?id=215813#c14

The subprocess library doesn't know about musl though
even though it supports posix_spawn https://git.musl-libc.org/cgit/musl/log/src/process/posix_spawn.c
so we have to teach it since it only has checks for glibc
1b736838e6/Lib/subprocess.py (L745)

The constant is documented as being able to be flipped here:
https://docs.python.org/3/library/subprocess.html#disabling-use-of-vfork-or-posix-spawn

* missed some

* adjust more tests

* coverage
2023-02-13 09:02:51 -05:00
epenet ea11a30a35
Add type hints to integration tests (part 13) (#87998) 2023-02-13 14:38:37 +01:00
Paulus Schoutsen c557cd2b1e
Make all history stats tests async (#87973) 2023-02-13 14:34:28 +01:00
epenet 1e352b60df
Add type hints to integration tests (part 11) (#87996) 2023-02-13 14:22:49 +01:00
Erik Montnemery 8f2a764a43
Adjust suggested_display_precision according to unit conversion (#87614) 2023-02-13 13:55:12 +01:00
epenet ea29cdfe83
Add type hints to integration tests (part 12) (#87997) 2023-02-13 13:03:51 +01:00
G Johansson 896dd1a36b
Change name to entity_id Text platform error messages (#87963) 2023-02-13 12:51:38 +01: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
Franck Nijhof f1daeabff0
Add homeassistant.reload_all service (#87769) 2023-02-13 12:09:29 +01:00
epenet 03710e58b5
Add type hints to integration tests (part 9) (#87983) 2023-02-13 12:06:51 +01:00
Franck Nijhof 6359775cfc
Add more entities for Elgato Key Light Mini (#87793)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-13 11:54:50 +01:00
epenet 89e4ee5320
Add type hints to integration tests (part 8) (#87982) 2023-02-13 11:13:48 +01:00
epenet 9404a107b2
Add type hints to integration tests (part 10) (#87985) 2023-02-13 10:25:26 +01:00
Erik Montnemery 3f910b49ae
Fix sensor unit conversion (#87978) 2023-02-13 10:08:07 +01:00
epenet b68f502769
Add type hints to integration tests (part 7) (#87980) 2023-02-13 09:53:09 +01:00
epenet b9beed4624
Add type hints to integration tests (part 6) (#87979) 2023-02-13 09:45:11 +01:00
Joakim Sørensen e842f90767
Add recorder engine name and version to analytics (#87784)
* Add recorder to analytics

* Add test

* Add recorder to after_dependencies

* Add version

* dialect can not be None
2023-02-13 09:18:12 +01:00
G Johansson 8c00f435a6
Change name to entity_id update platform error messages (#87960) 2023-02-12 22:18:09 +01:00
J. Nick Koston 7b9293941e
The recorder/statistic(s)_during_period websocket API now require the statistic_id(s) field (#87937) 2023-02-12 14:51:10 -06:00
rappenze 5f4a2a713c
Remove deprecated fibaro yaml config (#87939) 2023-02-12 21:50:50 +01:00
Ernst Klamer 18d3e4dca8
Fix kegtron state class for volume sensors (#87950) 2023-02-12 21:22:21 +01:00
epenet 728f62b1ec
Add type hints to integration tests (part 5) (#87850) 2023-02-12 19:39:48 +01:00
Klaas Schoute 60bcbd0473
Bump gridnet to v4.2.0 (#87903) 2023-02-12 18:53:05 +01:00
Allen Porter 4d186366bd
Improve Google Calendar config flow error message when API disabled (#87889) 2023-02-12 18:28:44 +01:00
Erik Montnemery 4db40810dd
Add support for dormakaba dKey locks (#87501)
* Add support for dormakaba dKey locks

* Pylint

* Address review comments

* Add test for already configured entry

* Add user flow

* Address review comments

* Simplify config flow

* Add tests

* Sort manifest

* Remove useless _abort_if_unique_id_configured

* Remove config entry update listener

* Simplify user flow

* Remove startup event

* Revert "Simplify user flow"

This reverts commit 0ef9d1c6bb.
2023-02-12 13:46:31 +01:00
J. Nick Koston 85649ec589
Reduce overhead to see if an entity is recorded (#87912)
A significant chunk of list_statistic_ids was checking if the entity
was recorded because it had to get the recorder instance over and
over
2023-02-11 23:21:16 -05:00
rappenze e1340e6ed4
Replace fiblary3 with pyfibaro library (#83500)
* Replace fiblary3 with pyfibaro library

* Fix some missing replacements for pyfibaro library

* Remove debug code which was committed accidentially

* Use fibaro_parent_id in another place

* Fix some bugs

* Move more code to the library

* Move has_unit check to correct place
2023-02-11 22:13:12 +01:00
J. Nick Koston 34e2751f14
Retrigger Bluetooth discovery when calling async_rediscover_address (#87884)
* Retrigger Bluetooth discovery when calling async_rediscover_address

* Retrigger Bluetooth discovery when calling async_rediscover_address

* tweak
2023-02-11 16:59:51 +01:00
G Johansson 7aa79415c1
Fix unbound variable in Group sensor (#87878)
* group bound last

* Add test
2023-02-11 16:27:22 +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 9f688a564f
Add type hints to integration tests (part 4) (#87848) 2023-02-11 08:26:13 +01:00
Jan Bouwhuis 41a92a872f
Add missed type hint on MQTT device tracker test (#87847) 2023-02-10 22:42:56 +01:00
Jan Bouwhuis 0bf4896c7f
Add type hints to MQTT init tests (#87402)
* Add hass type hint and `None` return type

* Add type hints on tmp_path

* Add registry hints

* Add caplog and hass_ws_client type hints

* Add type hints for MqttMockHAClientGenerator

* Add type hints MqttMockPahoClient

* Hints on fixtures `calls` and `record_calls`

* Other fixture type hints tweaks

* Add hints for mock_usename_password_set

* Update tests/components/mqtt/test_init.py

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

* correct domain

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-10 18:38:37 +01:00
J. Nick Koston c35661947a
Optimize fetching statistics by avoiding timestamp conversions (#87845)
* Optimize fetching statistics by avoiding timestamp conversions

* remove accidential unrelated change

* fix test

* recreate so we handle timezone changes
2023-02-10 11:26:46 -05: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 0cf5e9fb4a
Add type hints to integration tests (part 2) (#87789)
* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
2023-02-10 16:05:26 +01:00
epenet fa7acb4f0d
Add type hints to integration tests (part 3) (#87844) 2023-02-10 16:05:01 +01: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
Mike Heath b5dfd83c46
Fix Fully Kiosk Browser merging entities when MAC empty (#87743)
* Fix FKB merging entities when MAC empty

Fully Kiosk Browser will sometimes return an empty MAC address in the
device_info API call. When two Fully Kiosk devices are added with
missing MAC addresses, HA will assume the two devices are the same and
merge the entities. This fixes that problem.

Fixes #77722

* Update homeassistant/components/fully_kiosk/entity.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-10 09:19:09 +01:00
Raman Gupta 8aa64c8008
Add `has_firmware_update_cc` bool to zwave_js/node_status cmd (#87310)
* Add `has_firmware_update_cc` bool to zwave_js/node_status cmd

* fix test

* Switch order of equality check
2023-02-10 00:49:09 -05:00
Michael Hansen 8cd5106c15
Add HassGetState intent for queries (#87808)
* Use names instead of entity ids for list

* Add HassGetState for Assist queries

* Add unknown area to test

* Clean up and test device classes
2023-02-09 23:39:46 -05:00
Ernst Klamer 9dd806278b
Keep sleepy xiaomi-ble devices that don't broadcast regularly available (#87654)
Co-authored-by: J. Nick Koston <nick@koston.org>
fixes undefined
2023-02-09 16:42:08 -06:00
J. Nick Koston 4cebc767b5
Give users a hint that their bluetooth adapter has been ignored (#87727) 2023-02-09 16:41:53 -06: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
J. Nick Koston 84d14cc76a
Add reauthentication support to Yale Access Bluetooth (#87719)
* Bump yalexs_ble to 1.12.11 to fix reconnect when services fail to resolve

changelog: https://github.com/bdraco/yalexs-ble/compare/v1.12.8...v1.12.11

* bump to make it work with esphome proxy as well

* empty

* Add reauth support to yalexs_ble

* lint

* reduce

* tweak

* tweak

* test for reauth

* Apply suggestions from code review

* cleanup
2023-02-09 22:24:14 +01:00
J. Nick Koston 509de02044
Ensure recorder still shuts down if the final commit fails (#87799) 2023-02-09 15:12:40 -06:00
Tom Harris 926534bde2
Bump pyinsteon to 1.3.1 (#87788)
* Bump pyinsteon to 1.3.1

* Fix record received test

* Fix status received test
2023-02-09 21:40:06 +01:00
jan iversen b9b5a279f2
Correct sensor restore entity in modbus (#87563)
* Correct sensor restore entity.

* Review comments.
2023-02-09 21:35:44 +01:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
J. Nick Koston abf0c87e40
Migrate statistics to use timestamp columns (#87321) 2023-02-09 12:24:19 -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 db503c0daa
Always use UTC time for the MariaDB/MySQL session (#87583) 2023-02-09 11:39:45 -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
Jan Bouwhuis 1a38b9f665
Improve coverage MQTT device_trigger (#87408)
* Improve coverage MQTT device_trigger

* Use assert
2023-02-09 17:42:32 +01:00
epenet a13535b0c7
Bump renault-api to 0.1.12 (#87773)
fix https://github.com/hacf-fr/renault-api/pull/789
2023-02-09 16:55:02 +01:00
Jan Bouwhuis a244f9b202
Add type hints tests MQTT config_flow (#87783) 2023-02-09 16:47:28 +01:00
epenet 07a1a0efa9
Add type hints to integration tests (part 1) (#87777) 2023-02-09 16:09:13 +01:00
J. Nick Koston 03b47f1931
Disable test_entity_ids on MariaDB (#87766)
Dropping the database after this test will fail on
MySQL and hang forever because it causes an InnoDB deadlock

```
| 2042 | root   | localhost:52698 | NULL               | Query   |   41 | Waiting for table metadata lock | DROP DATABASE `homeassistant-test` |    0.000 |
```
2023-02-09 15:30:35 +01:00
J. Nick Koston f4a81a8b5b
Disable test_migration_in_progress on MySQL (#87765)
This test was recently enabled on MySQL in
https://github.com/home-assistant/core/pull/87753

Since it the migration is still in progress in the background
when the test ends, it causes deadlock with InnoDB when its dropped
out from under it
2023-02-09 15:27:27 +01:00
Jan Bouwhuis dc5f35a85e
Add missed type hints on MQTT platform tests (#87781) 2023-02-09 15:22:30 +01:00
J. Nick Koston 483b0cd017
Skip db locking test with postgresql/MySQL (#87760)
* Skip db locking test with postgresql/MySQL

https://github.com/home-assistant/core/pull/87756#issuecomment-1423828389

* switch to the guards instead
2023-02-09 13:58:32 +01:00
Franck Nijhof f5b651750c
Enable Ruff ICN001 (#87775) 2023-02-09 13:41:50 +01:00
Erik Montnemery 2d2ff19949
Round value in state_with_unit template function (#87619) 2023-02-09 12:54:59 +01:00
epenet 94779dddaa
Add type hints to diagnostics test helper (#85494)
* Add type hints to diagnostics test helper

* Move type alias to the top

* Use Any

* Move TestClientGenerator to typing helper

* Use `dict[str, Any]` again

* Use JsonObjectType

* Add cast
2023-02-09 12:15:18 +01:00
epenet bb174780b9
Apply registry type hints on mqtt platform tests (#87758)
Apply registry fixture types on platform tests
2023-02-09 11:53:56 +01:00
epenet 678d1e367d
Refactor onewire options flow tests (#87711) 2023-02-09 11:52:26 +01:00
Franck Nijhof 330e1c6cbb
Clean up unnecessary registry mocks from integration tests (#87763) 2023-02-09 10:43:45 +01:00
J. Nick Koston 77cdde94f3
Turn back off test_shutdown_before_startup_finishes test on MySQL (#87761) 2023-02-09 03:12:10 -06:00
Jan Bouwhuis df76e31cdf
Apply MQTT fixture types on platform tests (#87722)
* Apply MQTT fixture types on platform tests

* Add caplog type hint

* Add hass_ws_client type hint

* Add tmp_path type hint

* Add hass_client_no_auth type hint
2023-02-09 09:48:22 +01:00
starkillerOG bcf8cf4d8b
Add reolink https webhook warning (#87332)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
fixes undefined
2023-02-09 09:24:18 +01: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
Erik Montnemery 58618b2978
Improve recorder tests to use MariaDB / PostgreSQL (#87756) 2023-02-09 02:18:20 -06:00
Erik Montnemery b0f5bdd504
Improve migration tests to use MariaDB / PostgreSQL database (#87753) 2023-02-09 08:42:32 +01:00
Paulus Schoutsen f9dc562251
Stub I/O when loading registries in tests (#87744) 2023-02-09 08:25:52 +01:00
Franck Nijhof 76bf6f164f
Clean up unnecessary registry mocks from mqtt tests (#87728)
* Clean up unnecessary registry mocks from mqtt tests

* Fix helper methods
2023-02-09 08:19:06 +01:00
Franck Nijhof 80bf632e2d
Clean up unnecessary registry mocks from helpers (#87734) 2023-02-08 20:15:29 -05:00
Arturo 1c02f19d9a
Fix matter color temperature light (#87677)
* Adds tests for each matter light type and fixes small issue with color temperature lights not being detected properly

* Removes commented out code

* Changed matter light tests to pytest.mark.parametrize to reduce duplicate code
2023-02-08 23:41:04 +01:00
epenet aff0174afa
Add more type hints to conftest (#87737) 2023-02-08 22:58:00 +01:00
starkillerOG 0ab30ece68
Netgear ssdp discovery abort if no serial (#87532)
fixes undefined
2023-02-08 15:38:44 -06:00
Jan Bouwhuis b93c135c8d
Add type hints for MQTT discovery tests (#87425)
* Add type hints for MQTT discovery tests

* Remove more unused caplog instances

* rebase commit

* Small corrections

* Add event tye hint and correct string assignment

* Another Event type hint

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

* Correct test_complex_discovery_topic_prefix

* Import individual items from homeassistant.core

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-08 20:56:27 +01:00
Franck Nijhof 51a9f65a01
Clean up unnecessary registry mocks from Core tests (#87726) 2023-02-08 13:28:44 -06:00
Erik Montnemery 2246255e90
Create or import thread active dataset when setting up OTBR (#87186)
* Create a thread active dataset when discovering OTBR

* Align with lib changes

* Use thread preferred dataset if set

* Create a dataset also from the user flow
2023-02-08 19:32:19 +01:00
epenet 278050a73f
Add type hints to integration tests (t-z) (#87707) 2023-02-08 19:10:53 +01:00
epenet f75ac17554
Add type hints to integration tests (j-m) (#87704) 2023-02-08 19:06:59 +01:00
Martin Hjelmare 630028106a
Refactor tradfri cover tests (#87710)
* Refactor tradfri cover tests

* Complete typing
2023-02-08 18:31:04 +01:00
epenet 37a2040d7b
Add type hints to integration tests (h-i) (#87703) 2023-02-08 18:12:56 +01:00
epenet 807c69f621
Add type hints to integration tests (b-c) (#87698) 2023-02-08 18:08:43 +01:00
Jan Bouwhuis 1a414f1433
Add hass and `None` return type on MQTT platform tests (#87713)
Add hass and `None` return type on MQTT tests
2023-02-08 18:08:03 +01:00
epenet ba85fdcd61
Add type hints to integration tests (q-s) (#87706) 2023-02-08 08:12:54 -08:00
epenet 3abf7ea18a
Add type hints to integration tests (m-p) (#87705) 2023-02-08 07:48:54 -08: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
Erik Montnemery 93dafefd96
Include entity options in RegistryEntry.as_partial_dict (#87539) 2023-02-08 08:32:46 -05:00
epenet 7a4d15a657
Add type hints to integration tests (f-g) (#87700) 2023-02-08 13:33:52 +01:00
epenet 3052de3e8e
Add type hints to integration tests (d-e) (#87699) 2023-02-08 13:01:44 +01:00
epenet 2545694d41
Add type hints to integration tests (a) (#87684)
* Add type hints to accuweather tests

* Adjust a** components

* Adjust aiohttp_client

* ClientSessionGenerator/WebSocketGenerator
2023-02-08 12:16:23 +01:00
Franck Nijhof 1c3713d08f
Add studio mode switch to Elgato (#87691) 2023-02-08 11:42:53 +01:00
Jan Bouwhuis fc7e4b7664
Add type hints on common MQTT tests (#87299)
* Add hints for hass and return type

* Fix MqttMockType add apply hints to test_common

* Add type hints for other arguments

* Merge changes

* Add missed annotation

* Make tests types private and move to top
2023-02-08 11:20:27 +01:00
Erik Montnemery 45ac8c515e
Update unit system unit conversions (#87632)
* Update unit system unit conversions

* Tweak tests
2023-02-08 10:52:54 +01:00
Franck Nijhof c3e733c0aa
Replace global test markers with fixtures in Devolo home control tests (#87676) 2023-02-08 10:51:25 +01:00
epenet a4c4f77f73
Add more fixtures to pylint plugin (#87685) 2023-02-08 10:51:09 +01:00
Franck Nijhof 380bfe5b28
Enable Ruff PT002, PT003 (#87686) 2023-02-08 10:50:53 +01:00
Franck Nijhof 6582367917
Add battery sensor to Elgato (#87680) 2023-02-08 10:22:12 +01:00
Franck Nijhof e749521b29
Replace global test markers with fixtures in Synology DSM tests (#87678) 2023-02-08 09:42:57 +01:00
epenet c98b4e3204
Add typing to tests with single hass argument (2) (#87675)
* Add typing to tests with single hass argument (2)

* a few more
2023-02-08 08:51:43 +01:00