Commit Graph
60431 Commits
Author SHA1 Message Date
epenetandGitHub 18df3a22ca Add FTTH information to SFR Box (#89781) 2023-03-20 20:06:44 +01:00
J. Nick KostonandGitHub 49f08ad71d Filter out duplicate updates in esphome state dispatch (#89779) 2023-03-20 20:04:46 +01:00
Jon CaruanaandGitHub 20c9ed6d89 Mark LiteJet as Platinum integration (#88623) 2023-03-20 20:01:14 +01:00
J. Nick KostonandGitHub 6bb80adbb9 Rollback the session after performing stats schema validation (#89904) 2023-03-20 17:15:11 +01:00
Jan BouwhuisandGitHub 51b12cbf96 Add user_input as suggested value in imap config flow (#89982)
Add user_input as suggested value to config_schema
2023-03-20 15:52:54 +01:00
Jan BouwhuisandGitHub e4275a053c Remove yaml import from imap integration (#89981)
* Remove yaml import from imap integration

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

* Add common generic translations
2023-03-20 08:39:20 -04:00
Malte FrankenandGitHub 0bf652ca96 Refactor constants in geo_json_events integration (#89912)
move constants to separate file
2023-03-20 13:26:38 +01:00
Joakim PlateandGitHub 9f1e170851 Correct missing wordswap for S series nibe (#89866)
Correct missing wordswap for nibe
2023-03-20 12:08:27 +01:00
J. Nick KostonandGitHub 146a31163c Use bluetooth address instead of uuid on MacOS (#89926) 2023-03-20 12:07:41 +01:00
MichaelandGitHub e258f36ded Remove deprecated binary update sensor from AVM FRITZ!Box Tools (#89940) 2023-03-20 12:06:40 +01:00
c3043fb0ee Bump bluetooth deps for bleak 0.20 (#89925)
Co-authored-by: K <z@kwi.li>
2023-03-20 12:06:15 +01:00
micha91andGitHub f3b3818d1f Bump aiomusiccast to 0.14.8 (#89978) 2023-03-20 11:59:27 +01:00
Jesse MoodyandGitHub c4ee35570d Update django github references to main instead of master branch. (#89951) 2023-03-20 10:27:55 +01:00
epenetandGitHub 9a784fddef Fail CI on lingering timers (#89292) 2023-03-20 10:20:19 +01:00
J. Nick KostonandGitHub f62bb0e2ea Bump zeroconf to 0.47.4 (#89973) 2023-03-20 09:32:21 +01:00
J. Nick KostonandGitHub d33a303a83 Fix statistics schema µs precision auto repair being ineffective (#89902)
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 KostonandGitHub e798c30b8b Fix statistics schema auto repair when there is bad data (#89903)
- 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 PorterandGitHub 9721ba59b6 Rewrite the calendar trigger to fix potential bugs (#89918)
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 BouwhuisandGitHub 2039955ef7 Fix imap_email_content unknown status and replaying stale states (#89563) 2023-03-19 17:35:45 -10:00
939fce4607 Shield Reolink webhook callback from cancelation (#89798)
* 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
c94b054d75 Retain history when renaming an entity_id (#89963)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-19 17:33:21 -10:00
J. Nick KostonandGitHub affb48d271 Avoid joining states_meta for statistics queries (#89941) 2023-03-19 16:44:35 -10:00
J. Nick KostonandGitHub bf63e6cbd4 Set unique on StatesMeta and EventTypes database tables (#89971)
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 KostonandGitHub 817ba97227 Remove unneeded lambda_stmt in place add in statistics (#89943)
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 KostonandGitHub f27d73fc34 Remove legacy event lookups from logbook (#89945)
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 KostonandGitHub aebe4c66a6 Fix cpu thrashing during purge after all legacy events were removed (#89923)
* 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 KostonandGitHub 7f3e4cb3af Guard against selecting all invalid entity_ids in history (#89929)
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 KostonandGitHub 5ffb233004 Avoid database executor job to fetch statistic metadata on cache hit (#89960)
* 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 MoodyandGitHub d7de23fa65 Adjust eventloop -> event loop spelling (#89931)
eventloop -> event loop spelling
2023-03-19 21:53:21 +01:00
Matthias AlphartandGitHub 557b9c7d51 Add KNX interface device with diagnostic entities (#89213) 2023-03-19 02:13:52 -11:00
OliverandGitHub 0441a64c69 Update media state via telnet in denonavr integration (#89788) 2023-03-19 00:47:01 -10:00
J. Nick KostonandGitHub 87264d219a Fix ssl context being recreated frequently in httpx (#89932)
* Fix ssl context being created every time in httpx

* its expensive, only do it once
2023-03-19 05:13:48 -04:00
epenetandGitHub 0e7bd401f2 Fix lingering timer in config entry flow tests (#89853) 2023-03-19 08:56:24 +01:00
Sven SerlierandGitHub 36ad2c81f1 Adjust "Lovelace" to "Dashboards" (#89927)
"Lovelace" to "Dashboards"
2023-03-19 08:06:44 +01:00
J. Nick KostonandGitHub 300f7b4f77 Remove async_block_till_done in freebox (#89928)
async_block_till_done() is not meant to be called in integrations
2023-03-19 07:59:05 +01:00
Jesse MoodyandGitHub 95240e8aad Change README demo to demo.home-assistant.io subdomain (#89921)
change home assistant demo link
2023-03-19 07:52:42 +01:00
Jan BouwhuisandGitHub e937693d97 Fix blocking MQTT entry unload (#89922)
* Remove unneeded async_block_till_done

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

* Process review comments
2023-03-17 20:35:25 -04:00
Franck NijhofandGitHub cd3819abec Add state attribute translations for Sensor (#89896) 2023-03-17 20:32:52 -04:00
J. Nick KostonandGitHub 30e7ab247d Small cleanups to writing entity state (#89890)
* 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 NijhofandGitHub 8ecd73cac7 Add state attribute translations for Weather (#89897) 2023-03-17 20:29:48 -04:00
Franck NijhofandGitHub 1f4164def8 Add state (attribute) translations for Text (#89898) 2023-03-17 20:29:12 -04:00
J. Nick KostonandGitHub e87359761b Fix some I/O in the event loop during backup (#89894) 2023-03-17 20:28:29 -04:00
J. Nick KostonandGitHub b1f64de6ce Remove the old ix_states_event_id index if its no longer being used (#89901)
* 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 KostonandGitHub 138bbd9c28 Use json_loads_object util in backup (#89895)
* Use json_loads_object util in backup

* adjust test
2023-03-17 20:25:29 -04:00
Franck NijhofandGitHub dbebf8c783 Add state attribute translations for media players (#89821)
* 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