Commit Graph

17672 Commits (c5c5d9ed0cc83eed988b104f8839433a6443d6c3)

Author SHA1 Message Date
J. Nick Koston 547f32818c
Make core States use cached_property (#100312)
Need to validate this is worth removing __slots__
2023-09-13 20:33:25 -04:00
J. Nick Koston fe5eba9b31
Use cached_property in device registry (#100309) 2023-09-13 15:36:07 -05:00
Jan-Philipp Benecke 7b204ca36b
Use snapshot assertion for nexia diagnostics test (#100328) 2023-09-13 15:00:29 -05:00
J. Nick Koston 877eedf6d7
Use cached_property in entity_registry (#100302) 2023-09-13 14:38:40 -05:00
Quentame 8625bf7894
Add some tests to Freebox (#99755) 2023-09-13 20:22:47 +02:00
Robert Svensson 7b00265cfe
Remove legacy UniFi PoE client clean up (#100318) 2023-09-13 20:14:03 +02:00
Jan Rieger ee65aa91e8
Allow setting the elevation in `set_location` (#99978)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-09-13 18:09:12 +02:00
Joost Lekkerkerker f6b094dfee
Add options flow to Withings (#100300) 2023-09-13 18:08:15 +02:00
Erik Montnemery 6057fe5926
Replace StateMachine._domain_index with a UserDict (#100270)
* Replace StateMachine._domain_index with a UserDict

* Access the UserDict's backing dict directly

* Optimize
2023-09-13 18:05:17 +02:00
Joost Lekkerkerker 8498cdfb3c
Remove profile from Withings config flow (#100202)
* Remove profile from Withings config flow

* Add config flow migration

* Add config flow migration

* Remove datamanager profile

* Remove datamanager profile

* Add manufacturer

* Remove migration

* Remove migration

* Fix feedback
2023-09-13 15:49:36 +02:00
starkillerOG 80aa19263b
Netgear catch no info error (#100212) 2023-09-13 15:32:03 +02:00
Franck Nijhof afa0152261
Update syrupy to 4.5.0 (#100283) 2023-09-13 14:40:01 +02:00
Joost Lekkerkerker 38e013a90e
Remove NZBGet configurable scan interval (#98869) 2023-09-13 14:15:40 +02:00
Olen 7fe78fe9e4
Add diagnostics to Twinkly (#100146) 2023-09-13 13:09:57 +02:00
Joost Lekkerkerker 29d8be510e
Test speedtest.net config entry lifecycle (#100280) 2023-09-13 12:40:26 +02:00
TJ Horner dd95b51d10
Address weatherkit late review comments (#100265)
* Address review comments from original weatherkit PR

* Use .get() for optional fields
2023-09-13 09:22:58 +02:00
John Hollowell e87603aa59
Correct Venstar firmware version to use device's FW version instead of API version (#98493) 2023-09-13 08:35:59 +02:00
Luke Lashley 09f58ec396
Bump python-roborock to 0.34.0 (#100236) 2023-09-13 08:33:48 +02:00
Simone Chemelli fe85b20502
SamsungTV: Add unique_id for when missing (legacy models) (#96829)
* Add unique_id for when missing (legacy models)

* add comment

* update tests, thx @epenet
2023-09-13 01:24:49 +02:00
Joost Lekkerkerker 458a3f0df2
Remove restore functionality in Speedtest.net (#96950) 2023-09-12 21:12:01 +02:00
Erik Montnemery bbcbb2e322
Improve Entity._suggest_report_issue (#100204) 2023-09-12 21:07:32 +02:00
Erik Montnemery 51576b7214
Improve typing of entity.entity_sources (#99407)
* Improve typing of entity.entity_sources

* Calculate entity info source when generating WS response

* Adjust typing

* Update tests
2023-09-12 20:41:26 +02:00
mkmer 693a271e40
Clean up device registry for climate devices that no longer exist in Honeywell (#100072) 2023-09-12 20:29:47 +02:00
Joost Lekkerkerker 9672cdf3a9
Add entity translations to WLED (#99056) 2023-09-12 20:19:45 +02:00
uvjustin 5021c69886
Update Stream logging on EVENT_LOGGING_CHANGED (#99256) 2023-09-12 19:38:11 +02:00
Jan Bouwhuis e84a4661b0
Add intial property to imap_content event data (#100171)
* Add initial property to imap event data

* Simplify loop

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* MyPy

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-12 18:54:32 +02:00
Erik Montnemery 6485320bc4
Improve type annotations in websocket_api tests (#100198) 2023-09-12 17:31:25 +02:00
Erik Montnemery 6e6680dc4d
Enable asyncio debug mode in tests (#100197) 2023-09-12 10:12:22 -05:00
jan iversen c178388956
Remove modbus pragma no cover and solve nan (#99221)
* Remove pragma no cover.

* Ruff !

* Review comments.

* update test.

* Review.

* review.

* Add slave test.
2023-09-12 16:05:59 +02:00
jan iversen 9acca1bf58
Make modbus retry fast on read errors (#99576)
* Fast retry on read errors.

* Review comments.
2023-09-12 10:01:15 -04:00
Ståle Storø Hauknes 198532d51d
Airthings BLE unique id migration (#99832)
* Fix sensor unique id

* Add sensor identifiers

* Migrate entities to new unique id

* Fix linting issues

* Fix crash when migrating entity fails

* Change how entities are migrated

* Remve debug logging

* Remove unneeded async

* Remove migration code from init file

* Add migration code to sensor.py

* Adjust for loops to improve speed

* Bugfixes, improve documentation

* Remove old comment

* Remove unused function parameter

* Address PR feedback

* Add tests

* Improve tests and test data

* Refactor test

* Update logger level

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

* Adjust PR comments

* Address more PR comments

* Address PR comments and adjust tests

* Fix PR comment

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-12 09:59:54 -04:00
Mike Degatano 2b62285eee
Fix addon slug validation (#100070)
* Fix addon slug validation

* Don't redefine compile
2023-09-12 09:59:12 -04:00
Joakim Sørensen 1e2b0b65af
Bump hass-nabucasa from 0.70.0 to 0.71.0 (#100193)
Bump hass-nabucasa from 0.70.0 to 0.71.1
2023-09-12 09:58:25 -04:00
Erik Montnemery fabb098ec3
Simplify WS command entity/source (#99439) 2023-09-12 15:39:11 +02:00
Jan Bouwhuis 6b265120b3
Fix entity name attribute on mqtt entity is not removed on update (#100187)
Fix entity name attribute is not remove on update
2023-09-12 15:22:37 +02:00
jan iversen 71207e112e
Bring modbus naming in sync with standard (#99285) 2023-09-12 10:59:50 +02:00
Erik Montnemery 5bcb4f07a0
Bump hatasmota to 0.7.3 (#100169) 2023-09-12 09:58:05 +02:00
Álvaro Fernández Rojas da13afbd3c
Add missing AEMET wind gust speed (#100157) 2023-09-12 09:08:06 +02:00
Allen Porter 183b77973f
Add configuration flow to Todoist integration (#100094)
* Add config flow to todoist

* Fix service calls for todoist

* Fix configuration entry test setup

* Bump test coverage to 100%

* Apply pr feedback
2023-09-11 22:56:08 -07:00
Jan-Philipp Benecke 5d46e22591
Move airly coordinator to its own file (#99545) 2023-09-11 21:52:02 -05:00
J. Nick Koston a20d1a357f
Avoid probing ipp printers for unique_id when it is available via mdns (#99982)
* Avoid probing ipp printers for unique_id when it is available via mdns

We would always probe the device in the ipp flow and than
abort if it was already configured. We avoid the probe for
most printers.

* dry

* coverage

* fix test

* add test for updating host
2023-09-11 22:34:23 -04:00
Michael 3d28c6d636
Fix AVM Fritz!Tools update entity (#100151)
* move update entity to coordinator

* fix tests
2023-09-11 22:30:50 -04:00
Raman Gupta e231da42e1
Handle disconnects in zwave_js repair flow (#99964)
* Handle disconnects in zwave_js repair flow

* Combine logic to reduce LoC

* only check once
2023-09-12 04:21:44 +02:00
Jan-Philipp Benecke 4779cdf2ae
Let the discovergy config flow test end with create entry (#100153) 2023-09-11 23:06:06 +02:00
Joost Lekkerkerker c347c78b6d
Split Withings common file out to their own file (#100150)
* Split common out in logical pieces

* Split common out in logical pieces

* Split common out in logical pieces
2023-09-11 22:25:08 +02:00
Jan-Philipp Benecke 5a56adb3f5
Refactor discovergy config flow test to use parametrize (#100115)
* Refactor discovergy config flow test to use parametrize

* Formatting

* Implement code review sugesstions
2023-09-11 21:53:07 +02:00
puddly cbb28b6943
Migrate internal ZHA data to a dataclasses (#100127)
* Cache device triggers on startup

* reorg zha init

* don't reuse gateway

* don't nuke yaml configuration

* review comments

* Add unit tests

* Do not cache device and entity registries

* [WIP] Wrap ZHA data in a dataclass

* [WIP] Get unit tests passing

* Use a helper function for getting the gateway object to fix annotations

* Remove `bridge_id`

* Fix typing issues with entity references in group websocket info

* Use `Platform` instead of `str` for entity platform matching

* Use `get_zha_gateway` in a few more places

* Fix flaky unit test

* Use `slots` for ZHA data

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

---------

Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-11 21:39:33 +02:00
Joost Lekkerkerker 5c206de906
Decouple Withings webhook tests from YAML (#100143) 2023-09-11 14:06:20 -05:00
TJ Horner 17db20fdd7
Add Apple WeatherKit integration (#99895) 2023-09-11 12:06:55 -05:00
Erik Montnemery 18e08bc79f
Bump hatasmota to 0.7.2 (#100129) 2023-09-11 11:35:48 -05:00
Álvaro Fernández Rojas 9c65e59cc8
Remove AEMET daily precipitation sensor test (#100118) 2023-09-11 09:46:59 -05:00
Robert Svensson d8445a79fc
UniFi streamline loading platforms (#100071)
* Streamline loading platforms

* Move platform registration logic to UnifiController class
2023-09-11 15:55:27 +02:00
puddly a6f325d05a
Cache device trigger info during ZHA startup (#99764)
* Do not connect to the radio hardware within `_connect_zigpy_app`

* Make `connect_zigpy_app` public

* Create radio manager instances from config entries

* Cache device triggers on startup

* reorg zha init

* don't reuse gateway

* don't nuke yaml configuration

* review comments

* Fix existing unit tests

* Ensure `app.shutdown` is called, not just `app.disconnect`

* Revert creating group entities and device registry entries early

* Add unit tests

---------

Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
2023-09-11 14:36:01 +02:00
Erik Montnemery 42046a3ce2
Fix TriggerEntity.async_added_to_hass (#100119) 2023-09-11 14:33:43 +02:00
Joost Lekkerkerker a6e9bf830c
Decouple Withings binary sensor test from YAML (#100120) 2023-09-11 13:58:47 +02:00
Joost Lekkerkerker 5781e5e03e
Use json to store Withings test data fixtures (#99998)
* Decouple Withings sensor tests from yaml

* Improve Withings config flow tests

* Improve Withings config flow tests

* Fix feedback

* Use fixtures to store Withings testdata structures

* Use fixtures to store Withings testdata structures

* Use JSON

* Fix

* Use load_json_object_fixture
2023-09-11 12:36:37 +02:00
Jan-Philipp Benecke a4cb06d09f
Also handle DiscovergyClientError as UpdateFailed (#100038)
* Also handle DiscovergyClientError as UpdateFailed

* Change AccessTokenExpired to InvalidLogin

* Also add DiscovergyClientError to config flow and tests
2023-09-11 11:00:50 +02:00
Rami Mosleh eb0099dee8
Move smtp constants to const.py (#99542) 2023-09-11 09:36:55 +02:00
Michael Arthur 8beace265b
Add unit tests for sensors Electric Kiwi (#97723)
* add unit tests for sensors

* newline long strings

* unit test check and move time

* rename entry to entity

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* add types to test

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix newlined f strings

* remove if statement

* add some more explaination

* Update datetime

Co-authored-by: Robert Resch <robert@resch.dev>

* Simpler time update

Co-authored-by: Robert Resch <robert@resch.dev>

* add missing datetime import

* Update docustring - grammar

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

* address comments and issues raised

* address docstrings too long

* Fix docstring

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-11 01:30:25 +02:00
G Johansson 73a695d857
Fix incorrect docstring in TV Camera sensor test (#100083) 2023-09-11 01:22:33 +02:00
G Johansson 954293f77e
Add binary sensors to Trafikverket Camera (#100082) 2023-09-11 01:12:19 +02:00
G Johansson 4ebb6bb823
Add sensors to Trafikverket Camera (#100078)
* Add sensors to Trafikverket Camera

* Remove active

* Fix test len
2023-09-11 00:56:12 +02:00
Álvaro Fernández Rojas 3238386f48
Add water heater support to Airzone (#98401)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-10 12:31:11 -05:00
Tony 3b25262d6c
Address ruckus_unleashed late review (#99411) 2023-09-10 18:49:17 +02:00
Joost Lekkerkerker b165c28a7c
Improve Withings config flow tests (#99697)
* Decouple Withings sensor tests from yaml

* Improve Withings config flow tests

* Improve Withings config flow tests

* Fix feedback

* Rename CONF_PROFILE to PROFILE
2023-09-10 16:18:45 +02:00
Yuxiang Zhu 739eb28b90
Make homekit RTP/RTCP source ports more deterministic (#99989) 2023-09-10 09:07:35 -05:00
mkmer 59e87c0864
Raise HomeAssistantError/ValueError for service calls in Honeywell (#100041) 2023-09-10 15:58:59 +02:00
mkmer d56ad14673
Add diagnostic platform to Honeywell (#100046)
Add diagnostic platform
2023-09-10 15:49:56 +02:00
Diogo Gomes 553cdfbf99
Always update unit of measurement of the utility_meter on state change (#99102) 2023-09-10 08:29:38 -05:00
Bouwe Westerdijk c01a9987b5
Add Plugwise temperature_offset number (#100029)
Add temperature_offset number
2023-09-10 11:34:09 +02:00
J. Nick Koston 3b588a839c
Bump zeroconf to 0.103.0 (#100012) 2023-09-09 19:49:26 -05:00
Luke Lashley 602e36aa12
Add new sensors to Roborock (#99983)
* Add 3 new sensor types

* add state options for dock error

* add unit of measurement
2023-09-10 00:40:28 +02:00
Kevin Worrel 092580a3ed
Bump screenlogicpy to v0.9.0 (#92475)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-09 17:39:54 -05:00
Joost Lekkerkerker 4bc079b219
Use snapshot assertion in Plugwise diagnostic test (#100008)
* Use snapshot assertion in Plugwise diagnostic test

* Use snapshot assertion in Plugwise diagnostic test
2023-09-10 00:38:17 +02:00
Bouwe Westerdijk 081d0bdce5
Bump plugwise to v0.32.2 (#99973)
* Bump plugwise to v0.32.2

* Adapt number.py to the backend updates

* Update related test-cases

* Update plugwise test-fixtures

* Update test_diagnostics.py
2023-09-09 23:50:26 +02:00
Joost Lekkerkerker a62ffeaa99
Decouple Withings sensor tests from yaml (#99691)
* Decouple Withings sensor tests from yaml

* Fix feedback

* Add pytest fixture

* Update tests/components/withings/test_sensor.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update snapshots

* Update snapshots

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-09-09 19:11:28 +02:00
Luke Lashley 71726130c3
Add binary sensors to Roborock (#99990)
* init binary sensors commit

* add binary sensors

* fix test

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-09 18:12:14 +02:00
Joost Lekkerkerker 9be16d9d42
Add config flow to WAQI (#98220)
* Migrate WAQI to aiowaqi library

* Migrate WAQI to aiowaqi library

* Migrate WAQI to aiowaqi library

* Add config flow to WAQI

* Finish config flow

* Add tests

* Add tests

* Fix ruff

* Add issues on failing to import

* Add issues on failing to import

* Add issues on failing to import

* Add importing issue

* Finish coverage

* Remove url from translation string

* Fix feedback

* Fix feedback
2023-09-09 17:49:54 +02:00
J. Nick Koston bb2cdbe7bc
Change SSDP discovery scan interval to 10 minutes (#99975)
* Change SSDP discovery scan interval to 10 minutes

The first version used a scan interval of 1 minute which we
increased to 2 minutes because it generated too much traffic.

We kept it at 2 minutes because Sonos historicly needed to
get SSDP discovery to stay alive. This is no longer the case
as Sonos has multiple ways to keep from going unavailable:

- mDNS support was added
- We now listen for SSDP alive and good bye all the time
- Each incoming packet from the device keeps it alive now
- We probe when we think the device might be offline

This means it should no longer be necessary to have such a
frequent scan which is a drag on all devices on the network
since its multicast

* adjust tests
2023-09-09 10:54:40 -04:00
G Johansson e425662494
Bump pytrafikverket to 0.3.6 (#99869)
* Bump pytrafikverket to 0.3.6

* Fix config flow names

* str
2023-09-09 16:18:47 +02:00
Thomas Roager 74a7bccd65
Add zdb5100 light to zwave_js (#97586)
* added zdb5100 light

* added light to zdb5100

* Update tests/components/zwave_js/conftest.py

agree

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

* Update tests/components/zwave_js/conftest.py

agree

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

* Rename logic_group_zdb5100_light_state.json to logic_group_zdb5100_state.json

name change

* Update tests/components/zwave_js/test_light.py

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

* Update test_light.py

updated test and state

* Update test_light.py

incorrect endpoint

* changed the state

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-09 16:01:32 +02:00
Robert Svensson cf47a6c515
Add UniFi device uptime and temperature sensors (#99307)
* Add UniFi device uptime and temperature sensors

* Add native_unit_of_measurement to temperature
Remove seconds and milliseconds from device uptime
2023-09-09 11:12:44 +02:00
elmurato d59aa958b6
Add tests for Minecraft Server entry migration from v1 to v2 (#99954) 2023-09-08 23:03:27 +02:00
Erik Montnemery 1654ef7759
Make WS command render_template not give up if initial render raises (#99808) 2023-09-08 21:02:06 +02:00
Erik Montnemery b317e04cf1
Bump hatasmota to 0.7.1 (#99818) 2023-09-08 21:01:34 +02:00
Michael Hansen e69c88a0d2
Use aliases when listing pipeline languages (#99672) 2023-09-08 08:22:08 -04:00
Ali Yousuf 47a75cc064
Add more options to Islamic Prayer Times (#95156) 2023-09-08 13:07:33 +02:00
Sam Crang b2b57c5f87
Allow exporting of `update` domain to Prometheus (#99400) 2023-09-07 20:43:47 -07:00
lymanepp b76ba002e2
Fix missing dew point and humidity in tomorrowio forecasts (#99793)
* Fix missing dew point and humidity in tomorrowio forecasts

* Add assertion for correct parameters to realtime_and_all_forecasts method
2023-09-07 22:12:18 -04:00
Simone Chemelli a82cd48282
Bump aiovodafone to 0.1.0 (#99851)
* bump aiovodafone to 0.1.0

* fix tests
2023-09-08 00:32:15 +02:00
mkmer 4ce9c1f304
Add Diagnostic platform to Aladdin Connect (#99682)
* Add diagnostics platform

* Add diagnostic platform

* Add raw data to diagnostics

* Remove config data
bump aioaladdinconnect, use new doors property for diag

* remove unnecessary component config
refactor diag output
2023-09-07 21:27:41 +02:00
jan iversen 77180a73b7
Modbus scale parameter cuts decimals (#99758) 2023-09-07 20:56:00 +02:00
Quentame c3e14d0514
Fix Freebox Home battery sensor (#99756) 2023-09-07 17:28:50 +02:00
Erik Montnemery 368acaf6fd
Improve error handling in /api/states POST (#99810) 2023-09-07 13:33:38 +02:00
elmurato 7c3605c82e
Use config entry ID as unique ID and remove dependency to getmac in Minecraft Server (#97837)
* Use config entry ID as unique ID

* Add entry migration to v2 and and remove helper module

* Remove unneeded strings

* Add asserts for config, device and entity entries and improve comments

* Add debug log for config entry migration

* Reset config entry unique ID and use config entry ID instead

* Remove unnecessary unique ID debug log

* Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix

* Revert "Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix"

This reverts commit 07de334606054097e914404da04950e952bef6d2.

* Remove unused logger in entity module
2023-09-07 12:22:46 +02:00
Erik Montnemery e5210c5823
Always set severity level flag on render_template error events (#99804) 2023-09-07 12:00:19 +02:00
Quentame 1a22ab77e1
Fix Freebox disk free space sensor (#99757)
* Fix Freebox disk free space sensor

* Add initial value assert to check results
2023-09-07 10:28:08 +02:00
Maciej Bieniek e1f4a3fa9f
Add energy meter sensors for Shelly Pro EM (#99747)
* Add support for Pro EM

* Improve get_rpc_channel_name()

* Revert an unintended change

* Add tests
2023-09-07 06:59:04 +02:00
Jan Bouwhuis 7c7456df99
Handle alexa invalid climate temp adjustment (#99740)
* Handle temp adjust when target state not set

* Update homeassistant/components/alexa/errors.py

Co-authored-by: Robert Resch <robert@resch.dev>

* black

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-06 18:54:16 +02:00
mkmer 54d92b649b
Raise error on open/close failure in Aladdin Connect (#99746)
Raise error on open/close failure
2023-09-06 18:33:58 +02:00
Erik Montnemery c9a6ea94a7
Send template render errors to template helper preview (#99716) 2023-09-06 16:07:05 +02:00
David Knowles bb765449eb
Add binary_sensor to Schlage (#99637)
* Add binary_sensor to Schlage

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-06 15:03:54 +02:00
Jan Bouwhuis b815ea1332
Revert "Remove imap_email_content integration" (#99713) 2023-09-06 11:54:18 +02:00
Marc Mueller 274507b5c9
Fix pylint plugin test DeprecationWarning (#99711) 2023-09-06 11:35:57 +02:00
J. Nick Koston 034fabe188
Use loop time to set context (#99701)
* Use loop time to set context

loop time is faster than utcnow, and since its only used internally it can
be switched without a breaking change

* fix mocking
2023-09-06 11:04:49 +02:00
Erik Montnemery 48f7924e9e
Allow specifying a custom log function for template render (#99572)
* Allow specifying a custom log function for template render

* Bypass template cache when reporting errors + fix tests

* Send errors as events

* Fix logic for creating new TemplateEnvironment

* Add strict mode back

* Only send error events if report_errors is True

* Force test of websocket_api only

* Debug test

* Run pytest with higher verbosity

* Timeout after 1 minute, enable syslog output

* Adjust timeout

* Add debug logs

* Fix unsafe call to WebSocketHandler._send_message

* Remove debug code

* Improve test coverage

* Revert accidental change

* Include severity in error events

* Remove redundant information from error events
2023-09-06 10:03:35 +02:00
Erik Montnemery cdca4591a4
Include template listener info in template preview (#99669) 2023-09-06 09:49:42 +02:00
Maciej Bieniek d9a1ebafdd
Show OTA update progress for Shelly gen2 devices (#99534)
* Show OTA update progress

* Use an event listener instead of a dispatcher

* Add tests

* Fix name

* Improve tests coverage

* Fix subscribe/unsubscribe logic

* Use async_on_remove()
2023-09-06 08:17:45 +02:00
J. Nick Koston a2dae60170
Refactor dispatcher to reduce run time and memory overhead (#99676)
* Fix memory leak in dispatcher removal

When we removed the last job/callable from the dict for the
signal we did not remove the dict for the signal which meant
it leaked

* comment

* cleanup a bit more
2023-09-05 21:18:27 -04:00
Jan Bouwhuis c64d173fcb
Remove imap_email_content integration (#99484) 2023-09-05 21:50:51 +02:00
Robert Svensson b0e40d95ad
Bump aiounifi to v61 (#99686)
* Bump aiounifi to v61

* Alter a test to cover the upstream change
2023-09-05 21:13:28 +02:00
puddly 7ab1913ba4
Fix ZHA startup creating entities with non-unique IDs (#99679)
* Make the ZHAGateway initialization restartable so entities are unique

* Add a unit test
2023-09-05 20:30:28 +02:00
Raman Gupta 5afba6327c
Bump zwave-js-server-python to 0.51.1 (#99652)
* Bump zwave-js-server-python to 0.51.1

* Update test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-05 09:58:32 -04:00
itpeters 582eeea082
Fix long press event for matter generic switch (#99645) 2023-09-05 13:10:14 +02:00
J. Nick Koston ff2e0c570b
Improve performance of google assistant supported checks (#99454)
* Improve performance of google assistant supported checks

* tweak

* tweak

* split function

* tweak
2023-09-04 20:53:59 -04:00
J. Nick Koston 63273a307a
Fix Bluetooth passive update processor dispatching updates to unchanged entities (#99527)
* Fix passive update processor dispatching updates to unchanged entities

* adjust tests

* coverage

* fix

* Update homeassistant/components/bluetooth/update_coordinator.py
2023-09-04 20:42:05 -04:00
J. Nick Koston d2a52230ff
Speed up responding to states being polled via API (#99621)
* Speed up responding to states being polled via API

Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api

* Speed up responding to states being polled via API

Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api

* fix json

* cover
2023-09-04 16:51:19 -04:00
Erik Montnemery 26fd36dc4c
Revert "Deprecate timer start optional duration parameter" (#99613)
Revert "Deprecate timer start optional duration parameter (#93471)"

This reverts commit 2ce5b08fc3.
2023-09-04 20:10:16 +02:00
Erik Montnemery 7643820e59
Add loader.async_get_loaded_integration (#99440)
* Add loader.async_get_loaded_integration

* Decorate async_get_loaded_integration with @callback
2023-09-04 14:12:33 +02:00
Erik Montnemery 7c595ee2da
Validate state in template helper preview (#99455)
* Validate state in template helper preview

* Deduplicate state validation
2023-09-04 14:10:43 +02:00
Erik Montnemery 709ce7e0af
Set state of entity with invalid state to unknown (#99452)
* Set state of entity with invalid state to unknown

* Add test

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

* Update test_entity.py

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-04 14:09:51 +02:00
Erik Montnemery 6223af1899
Don't set assumed_state in fan groups (#99399) 2023-09-04 14:08:50 +02:00
Erik Montnemery f3d8a0eaaf
Don't set assumed_state in cover groups (#99391) 2023-09-04 14:08:38 +02:00
Russell Cloran 9144ef7ed8
Enumerate available states in Prometheus startup (#97993) 2023-09-04 09:30:56 +02:00
Marc Mueller 735b5cf1a0
Fix sql test warning (#99556) 2023-09-03 19:58:13 -05:00
Marc Mueller 115518cab9
Fix tolo test warning (#99555) 2023-09-03 19:58:01 -05:00
jan iversen f85a3861f2
Make validator for modbus table controlled (#99092) 2023-09-03 21:04:58 +02:00
Rami Mosleh ca44242095
Allow glances entries with same IP but different ports (#99536) 2023-09-03 19:22:59 +02:00
jan iversen d19f617c25
Modbus switch, allow restore "unknown" (#99533) 2023-09-03 17:48:25 +02:00
Allen Porter c938b9e7a3
Rename nest test_sensor_sdm.py to test_sensor.py (#99512) 2023-09-03 10:36:20 -05:00
jan iversen c94d4f501b
Read modbus data before scan_interval (#99243)
Read before scan_interval.
2023-09-03 17:13:49 +02:00
J. Nick Koston 186e796e25
Speed up fetching states by domain (#99467) 2023-09-03 09:30:39 -05:00
J. Nick Koston 1183bd159e
Bump zeroconf to 0.93.1 (#99516)
* Bump zeroconf to 0.92.0

changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.91.1...0.92.0

* drop unused argument

* Update tests/components/thread/test_diagnostics.py

* lint

* again

* bump again since actions failed to release the wheels
2023-09-03 11:16:26 +02:00
Allen Porter 7b1c0c2df2
Extend template entities with a script section (#96175)
* Extend template entities with a script section

This allows making a trigger entity that triggers a few times a day,
and allows collecting data from a service resopnse which can be
fed into a template entity.

The current alternatives are to publish and subscribe to events or to
store data in input entities.

* Make variables set in actions accessible to templates

* Format code

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-09-02 16:19:45 -07:00
Marc Mueller 6312f34538
Fix zha test RuntimeWarning (#99519) 2023-09-03 01:07:17 +02:00
Jc2k 4b11a632a1
Add sensors to private_ble_device (#99515) 2023-09-02 17:45:46 -05:00
J. Nick Koston b8f8cd1797
Reduce overhead to retry config entry setup (#99471) 2023-09-02 16:46:53 -05:00
Richard Kroegel bec36d3914
Add long-term statistics to BMW sensors (#99506)
* Add long-term statistics to BMW ConnectedDrive sensors

* Add sensor test snapshot

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-09-02 14:44:28 -07:00
starkillerOG 834f3810d3
Check new IP of Reolink camera from DHCP (#99381)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-02 21:00:33 +02:00
J. Nick Koston 1ab2e900f9
Improve lingering timer checks (#99472) 2023-09-02 12:43:27 -05:00
Jan Bouwhuis c3841f8734
Rework on mqtt certificate tests (#99503)
* Shared fixture on TEMP_DIR_NAME mock in MQTT tests

* Improve mqtt certificate file tests

* Update tests/components/mqtt/test_util.py

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

* Update tests/components/mqtt/conftest.py

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

* Avoid blocking code

* typo in sub function

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-02 19:26:11 +02:00
J. Nick Koston acd9cfa929
Speed up calls to the all states api (#99462) 2023-09-02 12:08:07 -05:00
Erik Montnemery defd9e4001
Don't compile missing statistics when running tests (#99446) 2023-09-02 10:09:46 -05:00
Jc2k 26b1222fae
Support tracking private bluetooth devices (#99465)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-02 09:21:05 -05:00
Paarth Shah 4d3b978398
Change matrix component to use matrix-nio instead of matrix_client (#72797) 2023-09-02 15:02:55 +02:00
Jan Bouwhuis 3d1efaa4ad
Freeze time for MQTT sensor expire tests (#99496) 2023-09-02 04:10:57 -05:00
Russell Cloran 5fd14eade5
Handle timestamp sensors in Prometheus integration (#98001) 2023-09-02 10:20:36 +02:00
Jan-Philipp Benecke cf59ea3c47
Use snapshot assertion for netatmo diagnostics test (#99159) 2023-09-01 19:27:54 +02:00
Raman Gupta 169a318ec4
Fix device name in zwave_js repair flow (#99414) 2023-09-01 18:06:37 +02:00
puddly 38270ee823
Create a ZHA repair when directly accessing a radio with multi-PAN firmware (#98275)
* Add the SiLabs flasher as a dependency

* Create a repair if the wrong firmware is detected on an EZSP device

* Update homeassistant/components/zha/strings.json

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>

* Provide the ZHA config entry as a reusable fixture

* Create a separate repair when using non-Nabu Casa hardware

* Add unit tests

* Drop extraneous `config_entry.add_to_hass` added in 021def44

* Fully unit test all edge cases

* Move `socket://`-ignoring logic into repair function

* Open a repair from ZHA flows when the wrong firmware is running

* Fix existing unit tests

* Link to the flashing section in the documentation

* Reduce repair severity to `ERROR`

* Make issue persistent

* Add unit tests for new radio probing states

* Add unit tests for new config flow steps

* Handle probing failure raising an exception

* Implement review suggestions

* Address review comments

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-09-01 09:05:45 -04:00