21461 Commits

Author SHA1 Message Date
Martin Hjelmare
b1af590eed
Fix reolink media source data access (#114593)
* Add test

* Fix reolink media source data access
2024-04-02 00:14:13 +02:00
Sid
304ed8bf3d
Unignore Ruff PLC in tests (#114572) 2024-04-01 21:28:54 +02:00
J. Nick Koston
96120b64e0
Fix missing mocking in nextdns tests (#114541) 2024-04-01 06:53:49 -10:00
Michael
2e11a61726
Automatic cleanup of entity and device registry in Tankerkoenig (#114573) 2024-04-01 16:04:18 +02:00
J. Nick Koston
ea7f2af966
Fix missing mocking in blink tests (#114540)
extracted from #114539
2024-04-01 11:23:38 +02:00
Sid
d5f883fbf0
Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
J. Nick Koston
be398e0a3f
Fix flakey sonos test test_creating_entry_sets_up_media_player (#114539) 2024-03-31 13:49:24 -10:00
Jan-Philipp Benecke
04786e019a
Use device registry mock instead of hass.helpers in traccar_server tests (#114532) 2024-04-01 00:42:46 +02:00
Jan-Philipp Benecke
ecf286cd81
Avoid use of hass.helpers in plugwise test (#114534) 2024-04-01 00:41:47 +02:00
Jan-Philipp Benecke
0238c2ea9e
Use device registry mock instead of hass.helpers in dsmr tests (#114535) 2024-04-01 00:41:06 +02:00
Robert Svensson
05d40fbc4c
Bump axis to v60 (#114544)
* Improve Axis MQTT support

* Bump axis to v60
2024-04-01 00:24:41 +02:00
Jan-Philipp Benecke
f08af5dc6d
Avoid use of hass.helpers in _mqtt_mock_entry fixture (#114536) 2024-03-31 11:33:59 -10:00
Thomas55555
5eb4cf6a05
Add error sensor for Husqvarna Automower (#113165)
* Add error sensor for Husqvarna Automower

* Apply suggestions from code review

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* address review

* Add restricted reason sensor

* ruff

* pin options

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-03-31 20:06:30 +02:00
wittypluck
7919ca63d0
Add uptime sensor to Glances (#111402)
* Add uptime sensor to Glances

* Merge upstream

* Merge upstream

* Fix coverage

* Add uptime sensor to Glances

* Merge upstream

* Merge upstream

* Fix coverage

* Move most uptime specific code to DataUpdateCoordinator

* Add last_reported after merge with upstream

* Add unit tests for uptime sensor

* Add unit tests for uptime sensor

* Add unit tests for uptime sensor

* Add unit tests for uptime sensor

* Move update code out of getter native_value()

* Add unit tests for uptime sensor

* Update uptime method signatures

* Set uptime icon in icons.json

* Use freezer.tick for uptime tests

* Frozen time test fails on github

* Add MIN_UPTIME_VARIATION const value

* Only update uptime on startup or when remote server restarts

* Fix for 0 values

* Set value to None to set state to Unknown if key is not found

* Add unit test for uptime change

* Code reduction

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-03-31 20:04:39 +02:00
Joost Lekkerkerker
52741d7114
Add single config entry to Analytics insights (#114427)
* Add single config entry to Analytics insights

* Add single config entry to Analytics insights

* Add single config entry to Analytics insights
2024-03-31 15:47:24 +02:00
Jan-Philipp Benecke
d5da0a053b
Deprecate hass.helpers (#114484)
* Deprecate hass.helpers

* Patch

* Patch _REPORTED_INTEGRATIONS set in test

* Fix test

* Update version
2024-03-31 11:44:11 +02:00
Sid
d846676e84
Enable first batch of Ruff RET rules (#114480)
* Enable first batch of Ruff RET rules

* disable pylint rules
2024-03-31 11:30:59 +02:00
Jan-Philipp Benecke
6e3e09f2c3
Use entity & device registry mocks instead of hass.helpers in airthings_ble tests (#114520) 2024-03-31 09:08:07 +02:00
J. Nick Koston
5038a035bd
Detect blocking module imports in the event loop (#114488) 2024-03-30 19:51:31 -10:00
Paulus Schoutsen
f01235ef74
Re-organize conversation integration (#114502)
* Re-organize conversation integration

* Clean up 2 more imports

* Re-export models

* Fix imports

* Uno mas

* Rename agents to models

* Fix cast test that i broke?

* Just blocking till I'm done

* Wrong place
2024-03-31 00:05:25 -04:00
J. Nick Koston
f0b07ae942
Add pytest rewrite for wemo tests that use entity_test_helpers (#114516) 2024-03-30 17:35:49 -10:00
TheJulianJES
b0a1450a2b
Fix ZHA websocket API test (#114495)
* Fix result overwriting expected config

* Use `BASE_CUSTOM_CONFIGURATION` for initial/expected config
2024-03-31 00:17:09 +01:00
Michael Hansen
d23b22b566
Add initial support for floors to intents (#114456)
* Add initial support for floors to intents

* Fix climate intent

* More tests

* No return value

* Add requested changes

* Reuse event handler
2024-03-30 16:59:20 -04:00
Bruno Henrique
9f9a141112
Add UniFi WLAN Password sensor (#114419)
* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

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

* Adding UniFi WLAN Password Sensor

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

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

* Adding UniFi WLAN Password Sensor

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-30 19:49:33 +01:00
J. Nick Koston
d63adb6350
Improve sonos test synchronization (#114468) 2024-03-30 06:34:47 -10:00
Shay Levy
3e99afdd54
Cleanup Shelly RGBW light entities (#114410) 2024-03-30 18:48:57 +03:00
Bruno Henrique
53f262095c
Add UniFi WLAN regenerate password button (#114422)
* Adding UniFi WLAN Change Password Button

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

* Adding UniFi WLAN Regenerate Password Button

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

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-30 15:53:23 +01:00
Joost Lekkerkerker
b7527feb5f
Rework opensky tests (#114441)
* Rework opensky tests

* Rework opensky tests

* Fix
2024-03-30 14:52:33 +01:00
Sid
6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
J. Nick Koston
9a79320861
Mark executor jobs as background unless created from a tracked task (#114450)
* Mark executor jobs as background unless created from a tracked task

If the current task is not tracked the executor job should not
be a background task to avoid delaying startup and shutdown.

Currently any executor job created in a untracked task or
background task would end up being tracked and delaying
startup/shutdown

* import exec has the same issue

* Avoid tracking import executor jobs

There is no reason to track these jobs as they are always awaited
and we do not want to support fire and forget import executor jobs

* fix xiaomi_miio

* lots of fire time changed without background await

* revert changes moved to other PR

* more

* more

* more

* m

* m

* p

* fix fire and forget tests

* scrape

* sonos

* system

* more

* capture callback before block

* coverage

* more

* more races

* more races

* more

* missed some

* more fixes

* missed some more

* fix

* remove unneeded

* one more race

* two
2024-03-30 00:16:53 -04:00
Sid
aec7a67a58
Unignore Ruff PLE, PLW in tests (#114406)
* Unignore Ruff PLE, PLW in tests

* fix tests
2024-03-29 23:58:30 +01:00
Jan Bouwhuis
5e3ce80488
Remove stale test for mqtt climate (#114443) 2024-03-29 16:01:50 +01:00
Luca Angemi
54c5f18aac
Add uid attribute to imap_content event data (#114432)
* Add uid to imap event

* Add ´uid´ to tests

* Update test_init.py
2024-03-29 15:04:24 +01:00
Sid
dc557fca1e
Refactor conversation mock_agent (#114428)
* Refactor conversation mock_agent

* Address review comments
2024-03-29 14:38:58 +01:00
Jan-Philipp Benecke
8d6d70d6b5
Use setup_test_component_platform helper for select entity component tests instead of hass.components (#114412)
* Use `setup_test_component_platform` helper for select entity component tests instead of `hass.components`

* Use _values instead of _attr_current_option

* Clean up

* Set default current_option for second mock entity

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-29 14:36:33 +01:00
Mischa Siekmann
6d54f686a6
Add Integration for Energenie Power-Sockets (#113097)
* Integration for Energenie Power-Strips (EGPS)

* cleanups reocommended by reviewer

* Adds missing exception handling when trying to send a command to an unreachable device.

* fix: incorrect handling of already opened devices in pyegps api. bump to pyegps=0.2.4

* Add blank line after file docstring, and other cosmetics

* change asyncio.to_thread to async_add_executer_job

* raises HomeAssistantError EgpsException in switch services.

* switch test parameterized by entity name

* reoved unused device registry

* add translation_key and update_before_add

* bump pyegps dependency to version to 0.2.5

* combined get_device patches and put into conftest.py

* changed switch entity to use _attr_is_on and cleanups

* further cleanup

* Apply suggestions from code review

* refactor: rename egps to energenie_power_sockets

* updated test snapshot

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-29 13:29:14 +01:00
Steven B
72614c86c2
Bump python-ring-doorbell to 0.8.8 (#114431)
* Bump ring_doorbell to 0.8.8

* Fix intercom history test for new library version

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-29 12:47:21 +01:00
Joost Lekkerkerker
ed7e5c4de6
Add single config entry to Mullvad (#114426)
* Add single config entry to Mullvad

* Add single config entry to Mullvad

* Add single config entry to Mullvad

* Fix
2024-03-29 11:04:37 +01:00
Jan-Philipp Benecke
247ee6e4f0
Address late review comments for fan entity component test (#114425)
* Address late review comments for fan entity component test

* Update tests/components/fan/common.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-29 10:18:57 +01:00
Jan-Philipp Benecke
045dc3f1fb
Use setup_test_component_platform helper for datetime entity component tests instead of hass.components (#114415) 2024-03-29 07:51:10 +01:00
Jan-Philipp Benecke
74d614243b
Use setup_test_component_platform helper for date entity component tests instead of hass.components (#114413)
* Use `setup_test_component_platform` helper for date entity component tests instead of `hass.components`

* Remove missing
2024-03-29 07:43:19 +01:00
Jan-Philipp Benecke
a102230498
Use setup_test_component_platform helper for time entity component tests instead of hass.components (#114411) 2024-03-29 07:34:00 +01:00
Jan-Philipp Benecke
ae635a5586
Use setup_test_component_platform helper for fan entity component tests instead of hass.components (#114409) 2024-03-29 07:32:41 +01:00
Sid
a5b609f081
Enable ruff TRY401 (#114395)
* Enable ruff TRY401

* fix tests
2024-03-29 07:20:36 +01:00
Jan-Philipp Benecke
530552b4f5
Use mock_platform for device_tracker entity component tests instead of hass.components (#114398)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-28 15:23:21 -10:00
Lennard Beers
282cbfc048
Add eq3btsmart integration (#109291)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-28 15:20:56 -10:00
Jan-Philipp Benecke
3fd24989c6
Use setup_test_component_platform helper for text entity component tests instead of hass.components (#114400) 2024-03-28 21:08:25 +01:00
Marc Mueller
443bfee16d
Replace partial annotations (#114177) 2024-03-28 18:33:39 +01:00
Michael Hansen
6fafb9c9b4
Filter preferred TTS format options if not supported (#114392)
Filter preferred format options if not supported
2024-03-28 11:09:15 -05:00
Franck Nijhof
3df03f5be5
Fix area search for entities of devices (#114394) 2024-03-28 16:57:29 +01:00