Commit graph

248 commits

Author SHA1 Message Date
J. Nick Koston
136f0e423e
Bump aioambient to 2024.08.0 (#124729) 2024-08-27 12:33:17 -10:00
epenet
913e5404da
Improve config flow type hints (part 1) (#124343)
* Improve config flow type hints

* Revert sms
2024-08-21 22:42:58 +02:00
Michael
844ccf461f
Remove unnecessary config schema definitions (#123197) 2024-08-05 17:44:14 +02:00
J. Nick Koston
dbd3147c9b
Remove async_late_forward_entry_setups and instead implicitly hold the lock (#119088)
* Refactor config entry forwards to implictly obtain the lock instead of explictly

This is a bit of a tradeoff to not need async_late_forward_entry_setups

The downside is we can no longer detect non-awaited plastform setups
as we will always implicitly obtain the lock instead of explictly.

Note, this PR is incomplete and is only for discussion purposes
at this point

* preen

* cover

* cover

* restore check for non-awaited platform setup

* cleanup

* fix missing word

* make non-awaited test safer
2024-06-12 21:06:11 -04:00
J. Nick Koston
ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
Marc Mueller
44049c34f9
Use PEP 695 type alias for ConfigEntry types (#117632) 2024-05-17 15:42:58 +02:00
Marc Mueller
63a45035dd
Use runtime_data for ambient_station (#116608) 2024-05-02 13:42:16 +02:00
William Easton
aee620be9f
Ambient Weather: Check for key existence before checking value (#115776) 2024-04-18 05:38:52 -06:00
William Easton
ed451cab3b
Update Ambient Weather to include Lightning Strike Time and Distance (#114255)
* Update sensor.py to include Lightning Distance

* Update strings.json to include Lightning Strikes distance

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/strings.json

* Update device class lightning distance

* Also add Last Lightning strike datetime

---------

Co-authored-by: Aaron Bach <bachya1208@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-06 23:39:43 +02:00
J. Nick Koston
06a752aa92
Small speed ups to ambient_station (#114698) 2024-04-02 16:09:27 -10:00
Marc Mueller
2c06d4fcb9
Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Paulus Schoutsen
f416d67d21
Remove built-in support for import_executor in manifest (#112725) 2024-03-08 12:02:32 -05:00
Marc Mueller
ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
J. Nick Koston
fd07d83c09
Import ambient_station in the executor to avoid blocking the event loop (#112053) 2024-03-02 15:16:57 -05:00
Erik Montnemery
6fe28d3764
Migrate integrations a-d to generic flowhandler (#111861) 2024-02-29 20:07:14 +01:00
J. Nick Koston
d6ba7bf506
Migrate ambient_station to use async_update_entry to alter config entries (#110305) 2024-02-11 21:45:34 -06:00
Joost Lekkerkerker
4f998acb78
Add icon translations to Ambient station (#108400) 2024-01-19 20:28:36 +01:00
Aaron Bach
9bbf098901
Remove unnecessary Ambient PWS entity description mixins (#108191) 2024-01-16 15:01:07 -10:00
Thomas Kistler
28cdf5f1d2
Bump aioambient to 2024.01.0 (#107767) 2024-01-10 18:04:15 -10:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Joost Lekkerkerker
fbe2228c3f
Extract Ambient Station base entity to separate file (#99142)
* Extract Ambient Station entity to separate file

* Add to coveragerc
2023-08-27 20:09:10 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Joost Lekkerkerker
d975e93abc
Add entity translations for Ambient station (#98075)
* Add entity translations for Ambient station

* Fix missed key
2023-08-09 01:16:55 +02:00
J. Nick Koston
a2555e71e2
Small cleanups to ambient station (#97421) 2023-07-28 16:30:29 -05:00
Aaron Bach
175f38b68a
Bump aioambient to 2023.04.0 (#90991) 2023-04-06 19:22:27 -10:00
Aaron Bach
e9f6a963a0
Bump aioambient to 2022.10.0 (#90940)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-06 14:33:41 -04:00
Erik Montnemery
3467f4674e
Remove unnecessary calls to async_update_entry from async_migrate_entry (#90575) 2023-03-31 15:53:35 +02:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
John Pettitt
59890cca68
Fix bad battery sense in ambient_station (#87668) 2023-02-09 10:36:05 +01:00
Erik Montnemery
231aad7a68
Sort manifests 1 (#87022) 2023-02-08 20:29:44 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Aaron Bach
020d52c3e2
Fix state class issues in Ambient PWS (#86758)
fixes undefined
2023-01-27 00:14:46 +01:00
J. Nick Koston
c599d1e1f8
Migrate ambient_station to use async_forward_entry_setups (#86555) 2023-01-24 20:33:17 +01:00
epenet
4c8e3aa7c4
Remove lumen from Illuminance units (#84386) 2022-12-27 14:25:47 +01:00
Franck Nijhof
b0cee0bc46
String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
epenet
911863ebf4
Use Irradiance unit and device class in integrations (#83576) 2022-12-08 23:51:47 +01:00
John Pettitt
31725d5411
Add leak detectors support for Ambient Station (#83357) 2022-12-07 07:53:00 -07:00
epenet
f1ce8a9004
Use new device class in ambient_station (#83322)
* Use new device class in ambient_station

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py

* Update homeassistant/components/ambient_station/sensor.py
2022-12-05 22:02:04 +01:00
GitHub Action
eaf6d43508 [ci skip] Translation update 2022-11-23 00:26:26 +00:00
GitHub Action
fe5246fb6f [ci skip] Translation update 2022-11-19 00:26:11 +00:00
GitHub Action
c7fc51cfa5 [ci skip] Translation update 2022-11-04 00:29:52 +00:00
epenet
7796f361fc
Use precipitation_intensity class in integrations (#80615) 2022-10-26 13:32:06 +02:00
Aaron Bach
2af58ad609
Set integration type on codeowned integrations @bachya (#80974) 2022-10-25 22:23:54 +02:00
epenet
7838bb3ebe
Replace new PRECIPITATION_INTENSITY with enum (#80653) 2022-10-25 16:45:45 +02:00
epenet
62b0735822
Adjust precipitation units in components (#79783)
* Adjust precipitation units in components

* Don't update darksky
2022-10-19 15:09:05 +02:00
Aaron Bach
f2207af1c9
Use entry.as_dict() in Ambient PWS diagnostics (#80111) 2022-10-11 09:26:44 -06:00
epenet
0e764b57c2
Use SensorDeviceClass.SPEED in components (#79262) 2022-09-29 09:37:21 +02:00
Aaron Bach
c9feda1562
Fix missing state classes on various Ambient PWS entities (#76683) 2022-08-14 21:13:11 -10:00
Robert Hillis
8ecbb85852
Use generators for async_add_entities in Ambient Station (#76586) 2022-08-10 19:05:09 -06:00
GitHub Action
c4ad6d46ae [ci skip] Translation update 2022-07-30 00:22:48 +00:00