Commit Graph

46508 Commits (5b4663d2ca729545635db0e4fc29b68ec961b2b7)

Author SHA1 Message Date
epenet 93efdc4991
Improve switch and climate type hints in integrations () 2023-03-21 13:26:41 +01:00
jan iversen 9092a76dbf
Correct typing of pymodbus in modbus () 2023-03-21 13:26:03 +01:00
epenet f01f5e1d2a
Improve type hints in tuya vacuum () 2023-03-21 13:25:19 +01:00
Franck Nijhof 2a0401366b
Add state translations for all day calendar attribute () 2023-03-21 07:53:05 -04:00
Franck Nijhof 6d3c3ff4fb
Add state translations for Select entities () 2023-03-21 12:45:06 +01:00
Franck Nijhof 0467c8ff63
Add attribute state translations for oscillating fans () 2023-03-21 07:39:07 -04:00
epenet 485a78e0cf
Improve light type hints in integrations ()
* Improve light type hints in integrations

* Improve
2023-03-21 11:40:33 +01:00
epenet 33e698d67f
Improve notify type hints in integrations () 2023-03-21 11:40:19 +01:00
epenet 86b4354477
Improve native_value type hints in integrations () 2023-03-21 11:40:06 +01:00
epenet 0e1c76f81f
Improve sensor type hints in integrations ()
* Improve sensor type hints in integrations

* Improve
2023-03-21 11:39:42 +01:00
epenet 4836404288
Improve media_player type hints in integrations ()
Fix some media_player type hints
2023-03-21 11:10:12 +01:00
epenet 04872f72ea
Improve humidifier type hints in integrations ()
Fix humidifier type hints in integrations
2023-03-21 10:32:13 +01:00
epenet 292feb4e24
Enable inheritance checks on ExtraStoredData () 2023-03-21 09:51:05 +01:00
Allen Porter 43ce6f843c
Update the calendar trigger based on PR feedback () 2023-03-21 09:21:14 +01:00
Franck Nijhof 23f136e9d6
Add state translations for Siren entities () 2023-03-21 09:16:32 +01:00
epenet dd1700954b
Deprecate YAML in SamsungTV ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-21 09:00:17 +01:00
Tom Harris 0c0c86bf7b
Add support for new Insteon i3 devcies () 2023-03-20 21:56:44 -10:00
J. Nick Koston a8e95684fa
Fix websocket back pressure bottleneck () 2023-03-20 21:51:39 -10:00
J. Nick Koston 0303618705
Handle cancelation of wait_for_ble_connections_free in esphome bluetooth ()
Handle cancelation in wait_for_ble_connections_free

If `wait_for_ble_connections_free` was canceled due to timeout or
the esp disconnecting from Home Assistant the future would get
canceled. When we reconnect and get the next callback we need
to handle it being done.

fixes
```
2023-03-21 02:34:36.876 ERROR (MainThread) [homeassistant] Error doing job: Fatal error: protocol.data_received() call failed.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 868, in _read_ready__data_received
    self._protocol.data_received(data)
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/_frame_helper.py", line 195, in data_received
    self._callback_packet(msg_type_int, bytes(packet_data))
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/_frame_helper.py", line 110, in _callback_packet
    self._on_pkt(Packet(type_, data))
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/connection.py", line 688, in _process_packet
    handler(msg)
  File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/client.py", line 482, in on_msg
    on_bluetooth_connections_free_update(resp.free, resp.limit)
  File "/usr/src/homeassistant/homeassistant/components/esphome/entry_data.py", line 136, in async_update_ble_connection_limits
    fut.set_result(free)
asyncio.exceptions.InvalidStateError: invalid state
```
2023-03-20 23:49:59 -04:00
J. Nick Koston 7158dbc142
Bump yalexs-ble to 2.1.1 ()
* Bump yalexs-ble to 2.1.1

There was another task that could be prematurely GCed

changelog: https://github.com/bdraco/yalexs-ble/compare/v2.1.0...v2.1.1

* fixes
2023-03-20 23:49:30 -04:00
Arturo 5e5ace9c4e
Add door lock device type to matter integration ()
* Adds base code for matter lock

* Adds basic matter door lock support

* Adds matter lock fixture

* Adds tests for matter lock

* Addresses feedback

* Added logic to handle inter states of matter lock

* Addesses feedback
2023-03-21 01:29:33 +01:00
Raman Gupta cbe85126cb
Introduce a delay between update entity calls ()
* Introduce a delay between update entity calls

* Update homeassistant/components/zwave_js/update.py

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

* move delay to constant and patch

* rename constant

* Switch to async_call_later

* Remove failing test

* Reimplement to solve task problem

* comment

* pass count directly so that value doesn't mutate before we store it

* lines

* Fix logic and tests

* Comments

* Readd missed coverage

* Add test for delays

* cleanup

* Fix async_added_to_hass logic

* flip conditional

* Store firmware info in extra data so we can restore it along with latest version

* Comment

* comment

* Add test for is_running check and fix bugs

* comment

* Add tests for various restore state scenarios

* move comment so it's less confusing

* improve typing

* consolidate into constant and remove unused one

* Update update.py

* update test to unknown state during partial restore

* fix elif check

* Fix type

* clean up test docstrings and function names

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-03-20 18:30:56 -04:00
epenet 18df3a22ca
Add FTTH information to SFR Box () 2023-03-20 20:06:44 +01:00
J. Nick Koston 49f08ad71d
Filter out duplicate updates in esphome state dispatch () 2023-03-20 20:04:46 +01:00
Jon Caruana 20c9ed6d89
Mark LiteJet as Platinum integration () 2023-03-20 20:01:14 +01:00
J. Nick Koston 6bb80adbb9
Rollback the session after performing stats schema validation () 2023-03-20 17:15:11 +01:00
Jan Bouwhuis 51b12cbf96
Add user_input as suggested value in imap config flow ()
Add user_input as suggested value to config_schema
2023-03-20 15:52:54 +01:00
Jan Bouwhuis e4275a053c
Remove yaml import from imap integration ()
* Remove yaml import from imap integration

* Cleanup sensor code and strings.json
2023-03-20 15:52:07 +01:00
Steven Looman 9a5ceb9ef8
Use default rounding/presentation mechanism for upnp () 2023-03-20 15:44:05 +01:00
Franck Nijhof 9949ca13aa
Adjust state class of Toon monetary sensors () 2023-03-20 08:42:59 -04:00
Franck Nijhof b9ff69d3ac
Extend attribute state translations for Camera ()
* Extend attribute state translations for Camera

* Add common generic translations
2023-03-20 08:39:20 -04:00
Malte Franken 0bf652ca96
Refactor constants in geo_json_events integration ()
move constants to separate file
2023-03-20 13:26:38 +01:00
Joakim Plate 9f1e170851
Correct missing wordswap for S series nibe ()
Correct missing wordswap for nibe
2023-03-20 12:08:27 +01:00
J. Nick Koston 146a31163c
Use bluetooth address instead of uuid on MacOS () 2023-03-20 12:07:41 +01:00
Michael e258f36ded
Remove deprecated binary update sensor from AVM FRITZ!Box Tools () 2023-03-20 12:06:40 +01:00
J. Nick Koston c3043fb0ee
Bump bluetooth deps for bleak 0.20 ()
Co-authored-by: K <z@kwi.li>
2023-03-20 12:06:15 +01:00
micha91 f3b3818d1f
Bump aiomusiccast to 0.14.8 () 2023-03-20 11:59:27 +01:00
Jesse Moody c4ee35570d
Update django github references to main instead of master branch. () 2023-03-20 10:27:55 +01:00
J. Nick Koston f62bb0e2ea
Bump zeroconf to 0.47.4 () 2023-03-20 09:32:21 +01:00
J. Nick Koston d33a303a83
Fix statistics schema µs precision auto repair being ineffective ()
If a user manually migrated their database to MySQL or PostgresSQL
and incorrectly created the timestamp columns as float we would
fail to correct them to double because when we migrated to use
timestamps for the columns I missed that we needed to change the
columns and types for µs precision
2023-03-20 00:06:37 -04:00
J. Nick Koston e798c30b8b
Fix statistics schema auto repair when there is bad data ()
- If the user had previously duplicated data we could end up
  picking the next metadata_id and there could be stale rows
  in the database that have that metadata_id. This can only happen
  from bad manual migrations (which is what this is function
  is validating in the first place). To solve this we now insert
  data with a future date and look at the latest inserted row
  instead of the first.

Example
```
['stored_statistics',
  defaultdict(<class 'list'>,
              {'recorder.db_test_schema': [{'end': 948589200.0,
                                            'last_reset': None,
                                            'max': None,
                                            'mean': 2021.0,
                                            'min': None,
                                            'start': 948585600.0,
                                            'state': None,
                                            'sum': 394.5068},
                                          {'end': 1601946000.000001,
                                            'last_reset': 1601942400.000001,
                                            'max': 1.000000000000001,
                                            'mean': 1.000000000000001,
                                            'min': 1.000000000000001,
                                            'start': 1601942400.000001,
                                            'state': 1.000000000000001,
                                            'sum': 1.000000000000001}]})]
```
2023-03-20 00:06:23 -04:00
Allen Porter 9721ba59b6
Rewrite the calendar trigger to fix potential bugs ()
Update the calander event trigger logic to have more exhaustive coverage. The
trigger will now use a timespan to create an explicit window for considering
upcoming events. The start/end of the time span is now more explicit, rather
than getting it from the alarm time.

The trigger is now broken into composable pieces:
- A timespan object for more explicitly managing the time window
- A function to get events during a time span
- A function to process upcoming events and determine the trigger times

The existing listener is now just responsible for scheduling alarms and glue.

This fixes bug with DST handling where the conversion back and forth between
UTC and timezone ends up dropping events during the jump forward. In practice,
an event was returned from the scanning, but it was never fired by the trigger
because (1) it was filtered out of the interval and (2) the event list was
previously cleared every iteration so it would get dropped.

Future improvements can bake more invariant checking into this structure.
2023-03-19 23:42:12 -04:00
Jan Bouwhuis 2039955ef7
Fix imap_email_content unknown status and replaying stale states () 2023-03-19 17:35:45 -10:00
starkillerOG 939fce4607
Shield Reolink webhook callback from cancelation ()
* shield Reolink webhook callback from cancelation

* Update homeassistant/components/reolink/host.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* fix styling

* fix black

* Revert to using asyncio.shield

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-03-19 23:35:16 -04:00
J. Nick Koston c94b054d75
Retain history when renaming an entity_id ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-19 17:33:21 -10:00
J. Nick Koston affb48d271
Avoid joining states_meta for statistics queries () 2023-03-19 16:44:35 -10:00
J. Nick Koston bf63e6cbd4
Set unique on StatesMeta and EventTypes database tables ()
Set unique on StatesMeta and EventTypes

These should have been marked unique originally to prevent
collision bugs from going unnoticed. These have not been
to beta yet so this is not a breaking change
2023-03-19 22:30:01 -04:00
J. Nick Koston 817ba97227
Remove unneeded lambda_stmt in place add in statistics ()
We can generate this entire query in a single lambda_stmt
so there is no need to add two which increases the size
of the cache key
2023-03-19 22:05:39 -04:00
J. Nick Koston f27d73fc34
Remove legacy event lookups from logbook ()
Events recorded with Home Assistant 2022.5.x or older will no
longer display context information in the logbook
2023-03-19 22:05:07 -04:00
J. Nick Koston aebe4c66a6
Fix cpu thrashing during purge after all legacy events were removed ()
* Fix cpu thrashing during purge after all legacy events were removed

We now remove the the index of of event ids on the states table when its
all NULLs to save space. The purge path needs to avoid checking for legacy
rows to purge if the index has been removed since it will result in a full
table scan each purge cycle that will always find no legacy rows to purge

* one more place

* drop the key constraint as well

* fixes

* more sqlite
2023-03-19 22:04:24 -04:00
J. Nick Koston 7f3e4cb3af
Guard against selecting all invalid entity_ids in history ()
If all the entity_ids that were provided do not exist we would
end up passing an empty list of ids to the SQL query which
would do an unbounded select
2023-03-19 22:03:12 -04:00
J. Nick Koston 5ffb233004
Avoid database executor job to fetch statistic metadata on cache hit ()
* Avoid database executor job to fetch statistic metadata on cache hit

Since we will almost always have a cache hit fetching
statistic meta data we can avoid an executor job

* Avoid database executor job to fetch statistic metadata on cache hit

Since we will almost always have a cache hit fetching
statistic meta data we can avoid an executor job

* Avoid database executor job to fetch statistic metadata on cache hit

Since we will almost always have a cache hit fetching
statistic meta data we can avoid an executor job

* remove exception catch since the threading.excepthook will actually catch this in production

* fix a few missed ones

* threadsafe

* Update homeassistant/components/recorder/table_managers/statistics_meta.py

* coverage and optimistic caching
2023-03-19 22:01:16 -04:00
Jesse Moody d7de23fa65
Adjust eventloop -> event loop spelling ()
eventloop -> event loop spelling
2023-03-19 21:53:21 +01:00
Matthias Alphart 557b9c7d51
Add KNX interface device with diagnostic entities () 2023-03-19 02:13:52 -11:00
Oliver 0441a64c69
Update media state via telnet in `denonavr` integration () 2023-03-19 00:47:01 -10:00
J. Nick Koston 87264d219a
Fix ssl context being recreated frequently in httpx ()
* Fix ssl context being created every time in httpx

* its expensive, only do it once
2023-03-19 05:13:48 -04:00
J. Nick Koston 300f7b4f77
Remove async_block_till_done in freebox ()
async_block_till_done() is not meant to be called in integrations
2023-03-19 07:59:05 +01:00
Jan Bouwhuis e937693d97
Fix blocking MQTT entry unload ()
* Remove unneeded async_block_till_done

* use await asyncio.sleep(0) instead
2023-03-18 14:57:40 -10:00
Vincent Knoop Pathuis 6ad9f420ab
Add Landis+Gyr poll on restart () 2023-03-18 08:50:50 -11:00
Franck Nijhof d106cb48d2
Add state attribute translations for light ()
* Add state attribute translations for light

* Process review comments
2023-03-17 20:35:25 -04:00
Franck Nijhof cd3819abec
Add state attribute translations for Sensor () 2023-03-17 20:32:52 -04:00
J. Nick Koston 30e7ab247d
Small cleanups to writing entity state ()
* Small cleanups to writing entity state

* reduce one prop access

* small cleanups

* small cleanups

* name conflict
2023-03-17 20:32:24 -04:00
Franck Nijhof 8ecd73cac7
Add state attribute translations for Weather () 2023-03-17 20:29:48 -04:00
Franck Nijhof 1f4164def8
Add state (attribute) translations for Text () 2023-03-17 20:29:12 -04:00
J. Nick Koston e87359761b
Fix some I/O in the event loop during backup () 2023-03-17 20:28:29 -04:00
J. Nick Koston b1f64de6ce
Remove the old ix_states_event_id index if its no longer being used ()
* Remove the old ix_states_event_id index if its no longer being used

* cover it

* fixes

* fixup

* Update homeassistant/components/recorder/tasks.py
2023-03-17 20:27:33 -04:00
J. Nick Koston 138bbd9c28
Use json_loads_object util in backup ()
* Use json_loads_object util in backup

* adjust test
2023-03-17 20:25:29 -04:00
Franck Nijhof dbebf8c783
Add state attribute translations for media players ()
* Add state attribute translations for media players

* Process review comments

* Process review comments

* Fix and extend

* Add yes/no as generic state
2023-03-17 20:24:33 -04:00
Jan Bouwhuis 5f22796b38
Refactor imap coordinator ()
* Warn if the previous push wait task it taking longer than the update interval

* refactor

* Call _async_fetch_number_of_messages first

* Add cleanup in case fetching fails

* mypy

* Set sensor to unknown if an error occured.

* Handling invalid auth an reraise when needed

* Handle invalid folder as setup error

* Close IMAP stream before logout at cleanup

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-17 22:45:15 +01:00
epenet 469dbec089
Add type hints to plex data ()
* Add type hints to plex data

* Rename method
2023-03-17 22:14:24 +01:00
J. Nick Koston 377dff5ee4
Ensure all recorder session executes use retries or the execute helper () 2023-03-17 10:45:58 -10:00
Kevin Worrel b403a96ea0
Bump screenlogicpy to v0.8.2 () 2023-03-17 10:10:37 -10:00
Franck Nijhof 95515fbe78
Improve/extend state translations for Alarm Control Panel () 2023-03-17 14:25:20 -04:00
Franck Nijhof e402e733a0
Add translations for Image processing () 2023-03-17 13:52:59 -04:00
Franck Nijhof db5a7b0e5e
Add translations for Geolocation () 2023-03-17 13:52:34 -04:00
Franck Nijhof 5657fcd1e8
Add state attribute translations for Number () 2023-03-17 13:52:19 -04:00
Franck Nijhof b1a3bfb298
Drop flake8 in favor of Ruff () 2023-03-17 13:30:06 +01:00
Martin Hjelmare f4de050904
Bump hass-nabucasa to 0.61.1 () 2023-03-17 13:27:05 +01:00
lunmay cdb01146da
Fix misstype translation reference keynames () 2023-03-17 12:05:29 +01:00
Malte Franken ed0a059053
Refactor entity manager code in geo_json_events integration ()
* moved entity manager

* fix circular reference

* simplify new entity signal
2023-03-17 11:59:29 +01:00
J. Nick Koston aa72b48725
Mark recorder system_health session read_only () 2023-03-17 10:22:21 +01:00
J. Nick Koston dbb2706c76
Reduce number of tasks created by compiling missing statistics () 2023-03-16 21:07:14 -10:00
J. Nick Koston d671d7fc1f
Add native_step to baf () 2023-03-16 19:13:42 -10:00
Jean-François Roy 5a6234d60e
Bump aiobafi6 to 0.8.0 () 2023-03-16 19:13:23 -10:00
J. Nick Koston f6f3565796
Reduce latency to find stats metadata () 2023-03-16 19:00:02 -10:00
Allen Porter 04a99fdbfc
Add local calendar diagnostics platform ()
* Add local calendar diagnostics platform

* Use redaction from ical

* Update diagnostics for new ical version

* Apply suggestions from code review

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

* Use snapshot tests for local calendar diagnostics

* Setup diagnostics directly in tests rather than via dependencies

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-16 23:05:01 -04:00
Erik Montnemery ae127e7687
Change light white service call attribute to accept True () 2023-03-16 23:02:56 -04:00
Franck Nijhof a153720599
Add state attribute translations for automations () 2023-03-16 23:02:11 -04:00
Franck Nijhof a2b6ef3d7b
Add state attribute translations for fans () 2023-03-16 23:01:47 -04:00
Franck Nijhof f8da3ee50e
Add state attribute translations for locks () 2023-03-16 23:00:45 -04:00
J. Nick Koston 350e967a89
Bump aioharmony to 0.2.10 ()
fixes 
2023-03-16 22:44:49 -04:00
Michael Hansen e16f17f5a8
Voice assistant integration with pipelines ()
* Initial commit

* Add websocket test tool

* Small tweak

* Tiny cleanup

* Make pipeline work with frontend branch

* Add some more info to start event

* Fixes

* First voice assistant tests

* Remove run_task

* Clean up for PR

* Add config_flow.py

* Remove CLI tool

* Simplify by removing stt/tts for now

* Clean up and fix tests

* More clean up and API changes

* Add quality_scale

* Remove data from run-finish

* Use StrEnum backport

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-16 20:42:26 -04:00
epenet 81c0382e4b
Fix lingering timer in bootstrap tests ()
* Fix lingering timer in bootstrap test

* Adjust comment

* Use a constant
2023-03-16 17:20:27 -04:00
Franck Nijhof f9919bb7cf
Add pre-defined entity name translations () 2023-03-16 21:10:20 +01:00
Franck Nijhof e6f280cf7a
Add state attribute translations for device trackers () 2023-03-16 19:58:52 +01:00
Franck Nijhof 298dae55fa
Add missing state translations for Lock entities () 2023-03-16 19:06:35 +01:00
Franck Nijhof d99c02b46f
Add state attribute translations for covers () 2023-03-16 19:04:25 +01:00
Franck Nijhof cb8ed4a1cc
Add state attribute translations for alarm control panel () 2023-03-16 19:04:11 +01:00
Franck Nijhof 3e89b81e1d
Add state attribute translations for calendars () 2023-03-16 19:03:23 +01:00
Bram Kragten ba4a638b39
Update frontend to 20230309.1 () 2023-03-16 18:32:07 +01:00
Erik Montnemery 9384ec18f8
Add filters to climate and light service descriptions ()
* Add filters to climate and light service descriptions

* Allow specifying enums directly

* Update service descriptions

* Adjust test

* Cache entity features

* Lint

* Improve error handling, add list of known base components

* Don't allow specifying an entity feature as int
2023-03-16 15:59:51 +01:00
Erik Montnemery 886c2635ad
Add support for constant selector ()
* Add support for constant selector

* Adapt to frontend PR changes
2023-03-16 09:02:26 -04:00
Joakim Plate b3bd80d905
Handle int or mapping for off case in nibe cooling ()
Handle int or mapping for off case in nibe
2023-03-16 13:26:56 +01:00
Kevin Siml e57031b1b5
Add Pushsafer notify parameters () 2023-03-16 13:03:05 +01:00
Franck Nijhof f32b7859b8
Restructure translations for entity components () 2023-03-16 12:16:08 +01:00
Erik Montnemery f55aaf7664
Drop unused Google entity settings from cloud () 2023-03-16 11:15:38 +01:00
Vincent Knoop Pathuis 273d794f7a
Add device class for Landis+Gyr GJ energy sensor () 2023-03-16 11:12:05 +01:00
epenet 69e85b3216
Fix SFR Box diagnostics () 2023-03-16 11:09:54 +01:00
epenet 913156b0e0
Avoid lingering timer on script shutdown () 2023-03-16 08:00:21 +01:00
J. Nick Koston c707ddbf7c
Bump aioesphomeapi to 13.5.1 () 2023-03-15 20:00:47 -10:00
jan iversen 2365a884d2
Secure modbus hub_collect remains valid ()
Secure hub_collect remains valid.
2023-03-15 23:48:00 -04:00
J. Nick Koston ecf6922ade
Bump yalexs_ble to 2.1.0 ()
switches to using cryptography to reduce the number of deps

changelog: https://github.com/bdraco/yalexs-ble/compare/v2.0.4...v2.1.0
2023-03-15 23:47:26 -04:00
J. Nick Koston ed27dae173
Small cleanups to recorder history ()
* Small cleanups to recorder history

* Small cleanups to recorder history

* fixes

* flake8 cannot figure it out
2023-03-15 23:44:33 -04:00
J. Nick Koston 99d6b1fa57
Migrate States to use a table manager () 2023-03-15 16:19:43 -10:00
J. Nick Koston e379aa23bd
Migrate StateAttributes to use a table manager ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-15 15:26:29 -10:00
Matthias Alphart a360da8bc3
Update xknx to 2.7.0 () 2023-03-15 23:28:43 +01:00
J. Nick Koston 69078b5aed
Bump pyblackbird to 0.6 for py3.11 () 2023-03-15 12:14:49 -10:00
J. Nick Koston aec2d63302
Add keep_days to recorder.purge_entities () 2023-03-15 11:13:47 -10:00
Jan Bouwhuis 6ba5f8e43a
Fix imap server push holding HA startup () 2023-03-15 21:22:13 +01:00
Raman Gupta 7a267460d3
Cache remote app list for vizio TVs () 2023-03-15 20:42:23 +01:00
Jack Boswell b43b2eb3cb
Avoid rounding Starlink sensor data & instead allow configurable precision () 2023-03-15 20:40:22 +01:00
zhangshengdong29 bf21b2622c
ArestData does not have available () 2023-03-15 19:13:32 +01:00
Michael d4edec2863
Move calculation of current value into lib in Fritz!SmartHome () 2023-03-15 18:59:03 +01:00
Erik Montnemery b7ac0058af
Fix hassio cleanup when addon in uninstalled () 2023-03-15 18:56:58 +01:00
Marcel van der Veldt fceb208381
Abort Hue config flow if bridge can not be reached ()
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-15 18:55:34 +01:00
starkillerOG 4eee626770
Reolink check firmware () 2023-03-15 18:54:28 +01:00
Maciej Bieniek dea29f539f
Use `SensorDeviceClass.ENUM` and add state attributes translations in Shelly integration () 2023-03-15 18:52:42 +01:00
epenet c416d18506
Add WAN information to SFR Box () 2023-03-15 18:49:57 +01:00
PatrickGlesner cb74b934dc
Fix NMBS IndexError () 2023-03-15 18:09:39 +01:00
Allen Porter b588b8b215
Bump ical to 4.5.0 () 2023-03-15 18:06:46 +01:00
StefanIacobLivisi 6b768b90b4
Bump aiolivisi to 0.0.19 () 2023-03-15 18:05:45 +01:00
epenet 8cbb1e542f
Address late feedback for SamsungTV () 2023-03-15 17:14:27 +01:00
Erik Montnemery 4d3799a9de
Make CalendarEntityFeature an IntFlag () 2023-03-15 09:22:16 -04:00
jan iversen 6e5b4f9f82
Add modbus hvac_* write registers () 2023-03-15 14:09:14 +01:00
J. Nick Koston a244749712
Make StatesMetaManager thread-safe when an entity_id is fully deleted from the database and than re-added ()
* refactor to make StatesMetaManager threadsafe

* refactor to make StatesMetaManager threadsafe

* refactor to make StatesMetaManager threadsafe

* refactor to make StatesMetaManager threadsafe

* reduce

* comments
2023-03-15 08:54:02 -04:00
starkillerOG 6a01c3369d
Reolink auto quick reply () 2023-03-15 12:56:01 +01:00
epenet 6270776fbb
Add turn_on trigger to Samsung TV ()
* Add turn_on trigger to Samsung TV

* Add tests

* Apply suggestions from code review

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

* Remove assert

* Cleanup mock_send_magic_packet

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-03-15 12:43:53 +01:00
jan iversen cd23caff58
Correct modbus serial method parameter () 2023-03-15 12:27:45 +01:00
J. Nick Koston 59de7f3057
Migrate EventData management to a table manager () 2023-03-14 21:40:59 -10:00
Joakim Plate bf8c4cae27
Update to nibe 2.1.4 () 2023-03-15 06:01:34 +01:00
J. Nick Koston b906d67c1e
Fix filtered purge not removing newer events () 2023-03-14 16:33:19 -10:00
Penny Wood 858fc30fcd
Fix infinite loop in sun.sun () 2023-03-14 16:27:29 -10:00
Allen Porter 4ddcb14053
Add additional CalendarEvent validation ()
Add additional event validation
2023-03-14 20:27:38 -04:00
Jack Boswell c33ca4f664
Add diagnostics to Starlink () 2023-03-14 22:24:47 +01:00
J. Nick Koston 0630b7b962
Reduce size of load query to prime event_types and states_meta at startup () 2023-03-14 21:31:31 +01:00
J. Nick Koston a6d6807dd0
Add typing to statistics results () 2023-03-14 09:06:56 -10:00
Marcio Granzotto Rodrigues 9d2c62095f
Bump bond-async to 0.1.23 () 2023-03-14 08:44:55 -10:00
Ernst Klamer d1969fd0c2
Add water sensor to bthome ()
* Add water sensor to bthome

* Use TOTAL state class for gas water and energy
2023-03-14 19:26:05 +01:00
Erik Montnemery 85e0177195
Add WS command for connecting OTBR to a known Thread network ()
* Add WS command for connecting OTBR to a known Thread network

* Add test
2023-03-14 15:28:06 +01:00
Bram Kragten a213ef2475
Add websocket command to set preferred thread dataset () 2023-03-14 15:27:31 +01:00
Aidan Timson 73e1942eeb
Update entity names to capitalize first word only for System Bridge () 2023-03-14 12:28:43 +01:00
epenet 2809a686be
Remove duplicate code in nextcloud () 2023-03-14 12:14:29 +01:00
Jan Bouwhuis ec1b8b616f
Debounce and group MQTT subscriptions ()
* Debounce and group mqtt subscriptions

* Cleanup

* Do not cooldown on resubscribe

* Remove lock from task

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

* ruff

* Longer initial cool down. Manages unsubscribes

* Own lock for access to self._pending_subscriptions

* adjust

* Subscribe to highest QoS when sharing subscription

* do not block _pending_subscriptions_lock with io

* Test the highest qos is subscribed at

* Cleanup max qos

* Follow up comments part 1

* Make docstr more generic

* Make max qos update thread safe

* Add lock on clearing _max_qos when resubscribing

* Wait for linger task

* User copy

* Check for key before cleaning up

* Fix lingering task

* Do not use a lock

* do not await _async_queue_subscriptions

* Replace copy with assignment

* Update max qos before returning

* Do not iterate if max_qos == 0

* Do not ieterate subs if max qos == 0

* Set initial cooldown correctly

* Ensure discovery cooldown ends after subscribing

* plan last subscribe with debouncer timeout

* cooldown if self._pending_subscriptions is set

* Revert format changes

* Remove stale assingnment self._last_subscribe

* Remove not used property

* Also check while for pending subscriptions

* revert first added sleep()

* Optimize

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-14 11:13:55 +01:00
J. Nick Koston 03b204f445
Execute sql queries in the database executor when using the recorder database () 2023-03-14 10:56:02 +01:00
J. Nick Koston dbc0890ce8
Add index to event_type and entity_id () 2023-03-14 10:09:21 +01:00
epenet b620e5d8a6
Move nextcloud constants () 2023-03-14 09:51:03 +01:00
amitfin cbee1ba496
Increase timeout for coolmaster with swing ()
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-03-14 09:47:26 +01:00
J. Nick Koston 2cb673db04
Handle bytes data in sql sensors () 2023-03-13 18:07:05 -10:00
G Johansson afa58b80bd
Default to recorder db for SQL integration ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-13 17:41:32 -10:00
Erik Montnemery 2f4e9c8ef3
Use otbr domain as dataset source () 2023-03-13 20:56:09 -04:00
Aidan Timson a99f6f7124
Handle ConnectionClosedException from System Bridge ()
Handle unretrieved ConnectionClosedException from System Bridge
2023-03-13 20:55:37 -04:00
Aidan Timson 6809bd3029
Remove incorrect state class for System Bridge sensors () 2023-03-13 20:54:49 -04:00
J. Nick Koston 6713253553
Bump ulid-transform to 0.4.2 ()
32 bit fixes

changelog: https://github.com/bdraco/ulid-transform/compare/v0.4.0...v0.4.2
2023-03-13 20:52:27 -04:00
puddly cbffaf30ba
Bump ZHA dependencies ()
* Bump `zha-quirks` library and account for `setup_quirks` signature

* Bump other ZHA dependencies

* Revert zigpy bump
2023-03-13 20:52:01 -04:00
Mick Vleeshouwer 0442a189e9
Add silent option for DynamicShutter (ogp:Shutter) in Overkiz ()
Add new switch
2023-03-14 00:42:12 +01:00
Paulus Schoutsen 8a4233ac8e
Bump SQLAlchemy to 2.0.6 () 2023-03-13 08:51:01 -10:00
Erik Montnemery d422b0dcc2
Make OTBR add newly created dataset to thread credential store () 2023-03-13 14:09:09 -04:00
starkillerOG d54259f9ac
Bump reolink-aio to 0.5.5 () 2023-03-13 18:47:00 +01:00
David Poll 0457bb2717
Add is_hidden_entity test for Jinja templates () 2023-03-13 18:20:33 +01:00
G Johansson 02389960ce
Refactor Command line sensor to inherit TemplateSensor ()
* Refactor sensor

* Remove not needed

* block until done

* reset test

* test sensor

* Add time
2023-03-13 17:23:25 +01:00
Nick Borgers a7396af4bb
Bump pybravia to 0.3.2 () 2023-03-13 16:06:29 +01:00
Erik Montnemery 8a0522ca2a
Include extended address in thread discovery data () 2023-03-13 15:59:22 +01:00
Erik Montnemery 0f2abe7f25
Bump python-otbr-api to 1.0.9 () 2023-03-13 15:52:36 +01:00
Joakim Sørensen 11e21378b1
Add sensors for supervisor host ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-13 15:39:49 +01:00
tomrennen 15506da332
Improved "ON" state check for `Use room sensor for cooling` () 2023-03-13 15:15:13 +01:00
Thijs Walcarius cdfb43d403
Address late review comments for frontier_silicon config flow ()
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: wlcrs <wlcrs@users.noreply.github.com>
2023-03-13 15:06:45 +01:00
Klaas Schoute 3aeda1792a
Bump easyEnergy to v0.2.1 () 2023-03-13 15:00:50 +01:00
anotherthomas 179cc4d7f7
Improve warnings in mqtt light messages ()
* improved warnings in mqtt light messages.

* fixed tests.
2023-03-13 14:46:16 +01:00
Erik Montnemery 3637d787cf
Fix `intellifire` name property ()
Fix intellifire name property
2023-03-13 14:01:28 +01:00
Penny Wood 429e52cf3d
Improve typing in climate.py () 2023-03-13 12:40:09 +01:00
starkillerOG 431a8d0047
Add support for dual lens cameras in Reolink () 2023-03-13 12:16:52 +01:00
Arjan 40ed3be4a8
Fix gtfs with 2023.3 (sqlachemy update) () 2023-03-13 11:57:49 +01:00
starkillerOG 6e10cd81dd
Use repair issue when port enable fails in Reolink ()
* Reolink use repair issue for disabled ports

* fix styling

* Add port repair issue tests

* Update homeassistant/components/reolink/strings.json

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-13 11:43:41 +01:00
Jan Rieger 78e8de9bd7
Add ESERA 1-Wire virtual integration () 2023-03-13 11:33:35 +01:00
cnico e73e88b922
Bump flipr-api to 1.5.0 ()
flipr api 1.5.0 to use the new cloud api
2023-03-13 11:16:45 +01:00
David Poll 7284af6a3e
Add an in-memory-preloading loader for Jinja imports ()
* Adds a loader to enable jinja imports.

* Switch to in-memory

* Move loading custom_jinja off of the event loop

* Raise TemplateNotFound if template doesn't exist

* Fix docstring

* Adds a service to reload custom jinja

* Remove IO from test setup

* Improve coverage and small refactor

* Incorporate feedback and use .jinja extension

* Check the loaded sources in test.

* Incorporate PR feedback.

* Update homeassistant/helpers/template.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-13 11:00:05 +01:00
G Johansson 5c4f93fa36
Refactor Command line cover to inherit TemplateEntity ()
* Refactor cover

* Remove not needed
2023-03-13 10:57:30 +01:00
G Johansson 5c42261210
Refactor Command line binary sensor to inherit TemplateEntity ()
* Refactor binary sensor

* Align
2023-03-13 10:56:18 +01:00
Erik Montnemery fd5c56fc7d
Rename modules named repairs.py which are not repairs platforms () 2023-03-13 09:44:20 +01:00
J. Nick Koston d1ee303e85
Drop duplicated indices from recorder database schema ()
Drop duplicated indices from schema

https://docs.percona.com/percona-toolkit/pt-duplicate-key-checker.html

```
% pt-duplicate-key-checker --databases fresh

ALTER TABLE `fresh`.`events` DROP INDEX `ix_events_event_type_id`;

ALTER TABLE `fresh`.`states` DROP INDEX `ix_states_metadata_id`;

ALTER TABLE `fresh`.`statistics` DROP INDEX `ix_statistics_metadata_id`;

ALTER TABLE `fresh`.`statistics_short_term` DROP INDEX `ix_statistics_short_term_metadata_id`;

```
2023-03-13 09:24:57 +01:00
dougiteixeira 470b0b5471
Adjust Tuya entity naming ()
Fix entity name
2023-03-13 09:23:04 +01:00
Eugenio Panadero 1fb11aec26
Bump aiopvpc to 4.1.0 () 2023-03-13 09:07:10 +01:00
Stephan Uhle c45fb85f17
Bump pysml to 0.0.9 () 2023-03-13 08:25:59 +01:00
Stephan Uhle 17c0e18776
Code quality update for EDL21 ()
Enhance code quality.
2023-03-13 08:04:24 +01:00
J. Nick Koston e34853a82a
Switch underlying history stats calculation to use seconds ()
* Switch history stats to report in seconds

Because hours were previously used, the data would always be off because
of the loss of resolution when the time being tracked was in a window
of more than 12s

* Apply suggestions from code review

* Update homeassistant/components/history_stats/sensor.py

* tweak
2023-03-12 23:05:48 -04:00
J. Nick Koston 0575b9bc88
Increase maximum aiohttp connections to 4096 ()
fixes 
2023-03-12 16:57:22 -10:00
Barry Loong 877efc993b
Add support for window device class to google assistant () 2023-03-12 22:45:25 -04:00
J. Nick Koston b9ac6b4a7c
Improve reliability of context id migration ()
* Split context id migration into states and events tasks

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

* add retry dec

* fix migration happening twice

* another case
2023-03-12 21:41:48 -04:00
J. Nick Koston 85ca94e9d4
Mark database sessions that do not write data as read_only ()
* Mark sessions that do not write data as read_only

* Mark sessions that do not write data as read_only
2023-03-12 21:33:28 -04:00
J. Nick Koston 977a07de13
Generate large history responses in the executor () 2023-03-12 21:32:26 -04:00