Commit graph

60784 commits

Author SHA1 Message Date
Paulus Schoutsen
81c39e42f4
Bump home-assistant-intents to 2023.3.29 (#90459) 2023-03-29 11:25:08 -05:00
epenet
f7925763a4
Make abort_entries_match available in options flow (#90406)
* Make abort_entries_match available in options flow

* Add tests

* Exclude ignore entries and add test

* Move to OptionsFlow

* Adjust tests

* Use mock_config_flow

* Use AbortFlow

* Remove duplicate code
2023-03-29 17:20:51 +02:00
mletenay
a1c94919de
Fix goodwe export limit unit on single phase DT inverters (#90427)
* Fix export limit unit on single phase DT inverters

* Update homeassistant/components/goodwe/number.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-29 16:01:14 +02:00
starkillerOG
d427c35c87
Reolink improve config flow login (#90036) 2023-03-29 14:41:38 +02:00
Renat Sibgatulin
8dbcbd156a
Add new sensors to airq (#90413)
Support for the sensors introduced in air-Q firmware v1.82.0
2023-03-29 11:33:27 +02:00
MatthewFlamm
c06bc28434
Limit observations requested for NWS (#90137)
* fetch data only for 70 minutes

* Use timezone aware now

* Type hint

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-29 10:34:29 +02:00
J. Nick Koston
b58c90602f
Bump yalexs-ble to 2.1.13 (#90442) 2023-03-29 09:39:44 +02:00
Klaas Schoute
0327f312f2
Fix data issue for easyEnergy during midnight (#90434) 2023-03-29 08:37:20 +02:00
Klaas Schoute
12edaa052c
Fix data issue for energyzero during midnight (#90433) 2023-03-29 08:29:44 +02:00
J. Nick Koston
8096be768d
Isolate the sql integration with a separate query cache (#90438)
* Isolate the sql integration with a seperate query cache

If there were a lot of sql integrations they could affect
the performance of the recorder/logbook/history since they
were sharing the same LRU and since the sql sensor updates
frequently it would evict the recorder queries from the
LRU.

* generate in stmt

* avoid double gen

* Revert "avoid double gen"

This reverts commit 6a5aa65268.
2023-03-28 23:54:03 -04:00
J. Nick Koston
5dc96a6952
Fix unbound variable in sql when session setup fails (#90439)
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
    await asyncio.shield(task)
  File "/Users/bdraco/home-assistant/homeassistant/components/sql/sensor.py", line 75, in async_setup_platform
    await async_setup_sensor(
  File "/Users/bdraco/home-assistant/homeassistant/components/sql/sensor.py", line 150, in async_setup_sensor
    sessmaker := await hass.async_add_executor_job(
  File "/opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/bdraco/home-assistant/homeassistant/components/sql/sensor.py", line 205, in _validate_and_get_session_maker_for_db_url
    if sess:
UnboundLocalError: local variable 'sess' referenced before assignment
2023-03-28 23:52:44 -04:00
Paulus Schoutsen
885be98f8f
OpenAI to use GPT3.5 (#90423)
* OpenAI to use GPT3.5

* Add snapshot
2023-03-29 05:37:43 +02:00
J. Nick Koston
403dffc12d
Reduce cache key size for queries that only need single columns (#90430)
* Reduce cache key size for queries that only need single columns

These queries only cared about a single row but would select
the whole set of columns from the orm object

* wrap it
2023-03-28 23:28:24 -04:00
J. Nick Koston
ce28bfe5b2
Remove unused types argument in statistics query generation (#90431)
* Remove unused types argument in statistics query generation

* update test
2023-03-28 23:01:11 -04:00
Nathan Spencer
2c7c8ccbfe
Fix bluetooth polling recovered log missing argument (#90436) 2023-03-28 16:36:26 -10:00
Thijs W
e3cad8baac
Migrate ssdp to config_flow for frontier_silicon (#89496)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-28 16:06:21 -10:00
TheJulianJES
47a2598b66
Add Aqara smoke sensor entities to ZHA (#90159)
* Add Aqara smoke sensor entities (WIP)

* Update smoke sensor entities (WIP)

* Drop two init attributes

* Move self-test button

* Remove self-test switch, add icons

* Add smoke sensor dbm entity

* Also add SMOKE device class to linkage alarm

Note: Enable "Linkage alarm" for this
2023-03-28 21:30:56 -04:00
TheJulianJES
12f49006cf
Add Aqara E1 thermostat entities to ZHA (#90158)
* Add Aqara E1 thermostat entities (WIP)

* Remove calibrate button for now

* Add diagnostic entity category to calibrated + external sensor

* Add multiplier for ZHA config number/away preset temp

* Set default multiplier correctly

* Add and use `CONFIG_DIAGNOSTIC_MATCH` for diagnostic entities
2023-03-28 21:12:21 -04:00
David F. Mulcahey
8660035027
Bump ZHA quirks to 0.0.95 (#90435) 2023-03-28 20:59:26 -04:00
J. Nick Koston
4f05246654
Bump onvif-zeep-async to 1.2.3 (#90382) 2023-03-28 13:54:33 -10:00
MattWestb
ee2101ef38
Add binding of IKEA Matter Switch cluster in ZHA (#89623)
* Adding binding of IKEA Matter Switch cluster

IKEA Symfonisk Gen 2 is using Matter ZCL Switch command but on manufacture cluster then its not supported in ZVL R8 that need being bond for sending the commands to the coordinator.

* Update manufacturerspecific.py

* Update manufacturerspecific.py

Delete not needed function `@registries.BINDABLE_CLUSTERS.register(0xFC80)`
2023-03-28 19:33:06 -04:00
J. Nick Koston
9dc936f8b9
Add sqlalchemy LRUs to the profiler lru service (#90428) 2023-03-28 12:02:35 -10:00
mletenay
9ae0236208
Add goodwe sensors for apparent/reactive pwr (#87940) 2023-03-28 23:31:14 +02:00
J. Nick Koston
f60e9c71a2
Make bootstrap cancelation safe (#90420) 2023-03-28 11:22:41 -10:00
Erik Montnemery
e22618a555
Write protect entity options (#90185) 2023-03-28 22:56:51 +02:00
J. Nick Koston
0550b17d54
Rework recorder filters to avoid caching mistakes (#90419) 2023-03-28 22:51:46 +02:00
Jan Bouwhuis
93e1cd8dd8
Add header with parsed date to imap event data (#90422) 2023-03-28 22:50:25 +02:00
mkmer
0ceee2b6c3
Catch somecomfort error in Honeywell (#90425) 2023-03-28 22:48:27 +02:00
starkillerOG
e9925f6062
Check webhook url is reachable in Reolink (#89585)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-28 22:46:59 +02:00
Jan Bouwhuis
24d0d15f38
Implement imap_content event for imap integration (#90242) 2023-03-28 21:02:43 +02:00
J. Nick Koston
d21433b6af
Ensure filters are generated inside the lambda locks (#90418) 2023-03-28 20:50:10 +02:00
Aaron Godfrey
9ccd43e5f1
Add DataUpdateCoordinator to the Todoist integration (#89836)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-28 18:57:24 +02:00
TheJulianJES
89a3c304c2
Refactor ZHA binary sensors to read from zigpy cache (#89481)
* Construct binary sensor state from zigpy cache (WIP)

* Workaround zha-quirks issue where "MotionWithReset" quirks don't update attribute cache (WIP)

zha-quirks currently has an issue where the ZONE_STATE attribute is updated (when the zone_STATUS changes).
https://github.com/zigpy/zha-device-handlers/pull/2231 is a proper fix for this.

For now, we just update the attribute cache when we get the "zone status update notification" command.

This wasn't noticed before, as the "attribute report signal" was sent from the `cluster_command()` method and the used the provided attribute (in the signal) to update the `_state` value in the binary sensor class.
As we just tell HA to write state again when we get an attribute report now, the ZONE_STATUS attribute is read now (and needs to be correct).

* Use parse() method of main class for IasZone entity (with stripped bits)

* Change wording in comment, remove explicitly sending attr signal

(This comment should be removed/changed later anyway)

* Remove note

* Get zone_status attribute id with zigpy

* Remove `security.` prefix for `IasZone` import

`AceCluster` was already directly imported and `IasZone` is too now for getting the attribute id

* Store full zone status attribute in cache

* Check that non-alarm bits are ignored in IasZone sensor test

* Re-enable occupancy binary sensor test

This test seems to work fine and I don't see any reason why it was commented out for a while

* Fix cached read mix-up for `zone_status`/`zone_state`

This allows cached reads for `zone_state` (enrolled or not), but forces a new read for `zone_status` (alarm or not).
2023-03-28 12:39:10 -04:00
Dmitry Vlasov
4b3c1f2800
Update zwave-me-ws version to 0.3.6 (#90233) 2023-03-28 17:24:19 +02:00
DerEnderKeks
9fecdddf01
Don't use force_update for Tasmota sensors (#85943)
* fix: don't use force_update for Tasmota sensors

* Update binary_sensor.py

* Update test_binary_sensor.py

* Update test_sensor.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-28 17:14:52 +02:00
Michał Huryn
0a51914740
Blebox cover tilt (#85515)
* feature: added tilt for shutterBox

* test: include tilt in tests
2023-03-28 17:11:48 +02:00
Joakim Sørensen
d907bd2ca3
Add connected relayer region to system health (#90410) 2023-03-28 17:09:59 +02:00
Wesley Vos
478a1d5e9a
Add periodically resetting meter option to utility meter (#88446)
* Use last valid state if meter is not periodically resetting

* Fix unload of entry, used during options flow submit

* Adjustments based on code review

* Move DecimalException handling to validation method

* Add test for invalid new state in calculate_adjustment method
2023-03-28 17:09:20 +02:00
ehendrix23
e45eab600f
Add has_value function/test to Jinja2 template (#79550) 2023-03-28 17:04:29 +02:00
Chris Xiao
048d30904e
Simplify qbittorrent sensor class init (#90411)
catch LoginException directly in QBittorrentSensor init

Since the `exception` arg in QBittorrentSensor `__init__` is always
LoginException, we catch LoginException directly in `__init__` instead
of passing LoginException as an argument.
2023-03-28 16:52:16 +02:00
Dave T
f081fa8feb
Add basic tests for temper USB temperature sensor integration (#80220)
* Add basic tests

* Updated requriements_test_all.txt

* Update temperusb version

* Add type hints

Co-authored-by: Christian Knittl-Frank <lcnittl@gmail.com>

* Add type hints

Co-authored-by: Christian Knittl-Frank <lcnittl@gmail.com>

* Correct typo in type hint

* Fix isort

* Fix requirements_test_all.txt

---------

Co-authored-by: Dave T <davet2001@users.noreply.github.com>
Co-authored-by: Christian Knittl-Frank <lcnittl@gmail.com>
2023-03-28 16:50:59 +02:00
Robert Hillis
866518c5a0
Add tests to Lidarr (#79610)
* Add tests to Lidarr

* fix js files

* take out the trash

* fix 3.9

* uno mas

* fix fixture

* ruff

* Update const.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-28 16:49:32 +02:00
Guido Schmitz
a26d95ec02
Add switch tests for devolo_home_control (#80154) 2023-03-28 16:45:06 +02:00
Alexander Momchilov
abe60375b3
Disable esphome stopping a cover if the cover doesn't support stopping (#80104)
* Make "CoverEntityFeature.STOP" conditional

* Check APIVersion before checking false by default flag

* sort

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-28 16:43:47 +02:00
b-uwe
3662c651c9
Add brand for HomeSeer (#90066) 2023-03-28 16:37:57 +02:00
epenet
bdf29b594f
Replace comments with docstring in ColorMode enum (#90408) 2023-03-28 16:32:39 +02:00
epenet
02e2e4d039
Add rest encoding test (#90404)
* Add rest encoding test

* docstring
2023-03-28 16:29:24 +02:00
Erik Montnemery
b4775ed2eb
Don't rely on the demo integration in voice_assistant tests (#90405) 2023-03-28 15:22:48 +02:00
Petro31
2123600039
Add minutely updates to relative_time and today_at template functions (#86815)
* add minutely update

* fix mypy
2023-03-28 15:10:28 +02:00
Nathan Spencer
cdefc48fcd
Add panel brightness control for Litter-Robot 4 (#86269)
* Add panel brightness control for Litter-Robot 4

* Use translation_key

* Fix test
2023-03-28 15:07:09 +02:00