Commit graph

273 commits

Author SHA1 Message Date
J. Nick Koston
58210b1968
Bump tesla-powerwall to 0.5.2 (#117823) 2024-05-20 16:51:39 -10:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
0200d1aa66
Unignore Ruff UP006, UP007 (#115533) 2024-04-14 00:26:58 -05:00
Paulus Schoutsen
f416d67d21
Remove built-in support for import_executor in manifest (#112725) 2024-03-08 12:02:32 -05:00
Marc Mueller
988c71ecc5
Add empty line after module docstring [n-q] (#112702) 2024-03-08 15:04:07 +01:00
Erik Montnemery
e0c1feb22c
Migrate integrations n-r to generic flowhandler (#111864) 2024-02-29 20:09:01 +01:00
J. Nick Koston
941df567f8
Import powerwall in the executor to avoid blocking the event loop (#111749)
`2024-02-27 22:44:17.087 DEBUG (MainThread) [homeassistant.loader] Component powerwall import took 0.459 seconds (loaded_executor=False)`
2024-02-28 14:31:23 -05:00
J. Nick Koston
ae49b3a274
Add async_schedule_reload helper to the ConfigEntries manager (#110912)
* Add async_schedule_reload helper to the ConfigEntries manager

We have cases where the the setup retry kicks in right before
the reload happens causing the reload to fail with
OperationNotAllowed. The async_schedule_reload will
cancel the setup retry before the async_reload task
is created to avoid this problem.

I updated a few integrations that were most likely
to have this problem. Future PRs will do a more
extensive audit

* coverage

* revert for now since this needs more refactoring in a followup

* cover

* cleanup and fixes
2024-02-20 02:14:45 +01:00
J. Nick Koston
1bc0263ea4
Revert powerwall back to awaiting each api call (#110947)
We converted these to run as tasks in the hope that it would be faster,
but since the cost of establishing another connection and the task
overhead exceeded the savings, it makes sense to await them all in
series.
2024-02-19 20:13:49 +01:00
Marc Mueller
438d3b01b9
Use builtin TimeoutError [o-s] (#109682) 2024-02-05 12:14:37 +01:00
Josh Pettersen
0cc8b2edf9
Remove battery charge sensor from powerwall (#109271) 2024-02-01 14:01:05 -06:00
Josh Pettersen
b629ad9c3d
Add individual battery banks as devices (#108339) 2024-01-30 19:03:01 -10:00
Josh Pettersen
2f9f0bae46
Add generic typing for powerwall sensors (#109008) 2024-01-30 16:28:27 -10:00
Josh Pettersen
b6126e7821
Convert gather calls into TaskGroups (#109010) 2024-01-30 12:38:45 -10:00
J. Nick Koston
b5c1d3feeb
Bump tesla-powerwall to 0.5.1 (#109069) 2024-01-29 22:50:06 +01:00
J. Nick Koston
e7be9cb447
Use new config entry update/abort helper in powerwall (#108674)
Use new config entry update/abort helper in powerwall

uses the new helper from https://github.com/home-assistant/core/pull/108034
2024-01-22 22:12:56 +01:00
J. Nick Koston
9033f1f3e8
Break long lines in powerwall integration (#108002) 2024-01-14 04:22:17 +01:00
J. Nick Koston
e7c25d1c36
Migrate powerwall unique ids to use the gateway din (#107509) 2024-01-13 16:17:37 -10:00
J. Nick Koston
3a4c64b0a7
Fix missing timeout exception check in powerwall config flow (#107899)
* Fix missing timeout exception check in powerwall config flow

powerwall recently switched to asyncio, and every place we
check for unreachable we need to check for timeout error.
There was one missed

```
09:08 homeassistant homeassistant[546]: 2024-01-12 10:09:08.899 ERROR (MainThread) [homeassistant.components.powerwall.config_flow] Unexpected exception
Jan 12 20:09:08 homeassistant homeassistant[546]: Traceback (most recent call last):
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 168, in _async_try_connect
Jan 12 20:09:08 homeassistant homeassistant[546]:     info = await validate_input(self.hass, user_input)
Jan 12 20:09:08 homeassistant homeassistant[546]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 76, in validate_input
Jan 12 20:09:08 homeassistant homeassistant[546]:     site_info, gateway_din = await _login_and_fetch_site_info(
Jan 12 20:09:08 homeassistant homeassistant[546]:                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 43, in _login_and_fetch_site_info
Jan 12 20:09:08 homeassistant homeassistant[546]:     await power_wall.login(password)
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 58, in login
Jan 12 20:09:08 homeassistant homeassistant[546]:     return await self.login_as(User.CUSTOMER, password, email, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 49, in login_as
Jan 12 20:09:08 homeassistant homeassistant[546]:     response = await self._api.login(user, email, password, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 172, in login
Jan 12 20:09:08 homeassistant homeassistant[546]:     return await self.post(
Jan 12 20:09:08 homeassistant homeassistant[546]:            ^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 146, in post
Jan 12 20:09:08 homeassistant homeassistant[546]:     response = await self._http_session.post(
Jan 12 20:09:08 homeassistant homeassistant[546]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 601, in _request
Jan 12 20:09:08 homeassistant homeassistant[546]:     await resp.start(conn)
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 960, in start
Jan 12 20:09:08 homeassistant homeassistant[546]:     with self._timer:
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
Jan 12 20:09:08 homeassistant homeassistant[546]:     raise asyncio.TimeoutError from None
Jan 12 20:09:08 homeassistant homeassistant[546]: TimeoutError

```

* cov
2024-01-12 21:39:27 +01:00
bubonicbob
c74bef265a
Update powerwall for tesla_powerwall 0.5.0 which is async (#107164)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-10 11:21:53 -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
Marc Mueller
5014e2f0c7
Fix powerwall typing (#104875) 2023-12-01 05:42:50 -10:00
AtomBrake
eb020dd66c
Update powerwall password description (#100389)
Update strings.json

Updated wording of how to find password on newer model gateways
2023-09-24 08:02:48 +02:00
Joost Lekkerkerker
0ab0901f0f
Add entity translations to Powerwall (#98843) 2023-08-22 21:58:57 +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
J. Nick Koston
44a3885986
Disable always_update in powerwall coordinator (#97416) 2023-07-28 12:41:05 -05:00
J. Nick Koston
e2d2aeadaa
Fix typo in powerwall strings (#91956) 2023-04-24 17:54:22 +02:00
J. Nick Koston
60ae1f99e0
Update powerwall strings for newer models (#90151) 2023-03-23 10:13:18 +01: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
Erik Montnemery
1450b44c63
Sort manifests 7 (#87028) 2023-02-08 20:32:43 +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
GitHub Action
f475446ebf [ci skip] Translation update 2023-02-06 00:23:07 +00:00
Franck Nijhof
3d557b5583
Collection of code styling tweaks (#87381) 2023-02-04 12:52:26 -05:00
Dan Simpson
66e21d7701
Add Powerwall off grid switch (#86357)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-23 15:03:15 -10:00
Dan Simpson
0c1abd5f10
Bump tesla_powerwall lib version to 0.3.19 (#86421) 2023-01-22 18:59:33 -10:00
GitHub Action
d1ecc418bb [ci skip] Translation update 2023-01-19 00:25:04 +00:00
GitHub Action
b81453cb6b [ci skip] Translation update 2023-01-16 00:24:22 +00:00
GitHub Action
77f9548e51 [ci skip] Translation update 2023-01-15 00:25:52 +00:00
Marc Mueller
e170681016
Improve DataUpdateCoordinator typing in integrations (3) (#84657) 2022-12-27 22:49:23 +01:00
epenet
ebdf9a8658
Use UnitOfEnergy in integrations (o-z) (#84221) 2022-12-19 10:58:37 +01:00
epenet
0184aadb09
Use UnitOfElectricPotential in integrations (#84044) 2022-12-15 13:59:21 +01:00
epenet
946d5535b4
Use UnitOfFrequency in integrations (#83915) 2022-12-13 11:47:06 +01:00
GitHub Action
b9753a9f92 [ci skip] Translation update 2022-12-13 00:27:47 +00:00
epenet
3edb0969de
Use UnitOfPower in integrations [h-r] (#83815) 2022-12-12 11:41:58 +01:00
Brandon Rothweiler
f24f0c2954
Fix incorrect usage of 'setup' vs 'set up' (#83774) 2022-12-12 11:40:00 +01:00
epenet
7c3ca38eb7
Use UnitOfElectricCurrent in integrations (#83622) 2022-12-09 10:51:26 +01:00
GitHub Action
f25017313a [ci skip] Translation update 2022-12-09 00:24:29 +00:00
GitHub Action
1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00
GitHub Action
3ab9a14ce7 [ci skip] Translation update 2022-12-06 00:21:31 +00:00
GitHub Action
5f9290e572 [ci skip] Translation update 2022-12-05 00:23:07 +00:00