Commit graph

85 commits

Author SHA1 Message Date
Paulus Schoutsen
1aa9588dcb
Include hass device ID in mobile app get_config webhook (#121496) 2024-07-08 11:00:21 +02:00
Marc Mueller
f4b124f5f1
Fix invalid schemas (#120450) 2024-06-25 20:17:38 +02:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Sid
82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
J. Nick Koston
c69495b64f
Remove supports_encryption check from mobile_app (#113490)
helpers already ports nacl at top level so this check can never
be False

```
>>> import sys
>>> from nacl.secret import SecretBox
>>> assert nacl in sys.modules
>>>
```
2024-03-15 11:13:44 +01:00
Marc Mueller
59a6035d3f
Add empty line after module docstring [j-m] (#112700) 2024-03-08 09:01:29 -05:00
Jan-Philipp Benecke
8770a50859
Remove deprecated hass.components usage in mobile_app (#111888) 2024-03-06 09:11:31 +01:00
J. Nick Koston
fed1cab847
Fix mobile app dispatcher performance (#99647)
Fix mobile app thundering heard

The mobile_app would setup a dispatcher to listener for updates on
every entity and reject the ones that were not for the unique id
that it was intrested in.

Instead we now register for a signal per unique id since we were
previously generating O(entities*sensors*devices) callbacks which
was causing the event loop to stall when there were a large
number of mobile app users.
2023-09-04 20:56:34 -04:00
J. Nick Koston
51a7df162c
Avoid regenerating the mobile app schema every time a webhook is called (#96733)
Avoid regnerating the mobile app schema every time a webhook is called
2023-07-17 08:42:46 +02:00
J. Nick Koston
48b93e03ee
Cache transient templates compiles provided via api (#89065)
* Cache transient templates compiles provided via api

partially fixes #89047 (there is more going on here)

* add a bit more coverage just to be sure

* switch method

* Revert "switch method"

This reverts commit 0e9e1c8cbe.

* tweak

* hold hass

* empty for github flakey
2023-03-02 21:31:12 -05:00
Paulus Schoutsen
bc2b35765e
Stop processing when we hit bad encryption in mobile app (#88150)
* Stop processing when we hit bad encryption

* Accept webhook payload that is a list

* Rename functions because we import them

* Revert a debug thing

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-16 13:05:16 -05: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
Paulus Schoutsen
e0f8b5bbd1
Fix some mobile app sensor registration/update issues (#86965)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-30 20:08:19 +01:00
Paulus Schoutsen
9631146745
Add conversation mobile app webhook (#86239)
* Add conversation mobile app webhook

* Re-instate removed unused import which was used as fixture
2023-01-19 13:59:02 -05:00
Franck Nijhof
baef267f33
String formatting and max line length - Part 3 (#84394) 2022-12-22 13:35:47 +01:00
Joris Pelgröm
34fd64addf
Fix mobile_app returning cloud URL when not subscribed (#83257)
fixes undefined
2022-12-04 21:10:26 -05:00
Paulus Schoutsen
7dff44b3e9
Fix mobile app passing incorrect device ID when scanning tag (#82820) 2022-11-28 08:35:57 -05:00
epenet
615f7204cb
Add type hints to mobile app webhooks (#82177) 2022-11-16 16:07:43 +01:00
epenet
00f4933e72
Import tag from homeassistant.components (#82161) 2022-11-16 07:09:46 +01:00
epenet
af9ac9022b
Import tag via hass.components in mobile_app (#82138)
* Import tag via hass.components in mobile_app

* Update webhook.py
2022-11-15 18:27:37 +01:00
epenet
7871a517a8
Import constants from root (#78271) 2022-09-12 18:53:05 +02:00
Franck Nijhof
c8f700c803
Clean up accessing dispatcher helpers via hass (#72014)
Clean up accessing ditpatcher helpers via hass
2022-05-17 18:41:36 +02:00
Paulus Schoutsen
0b09376360
Mobile app to notify when sensor is disabled (#71561)
* Mobile app to notify when sensor is disabled

* Add entity status to get_config

* Allow overriding enabled/disabled
2022-05-17 09:05:49 -07:00
Paulus Schoutsen
1c841590aa
Reduce mobile app error to debug (#71601) 2022-05-09 23:12:48 +03:00
Paulus Schoutsen
539ce7ff0e
Allow mobile app to disable entities by default (#71562) 2022-05-09 08:05:31 -05:00
epenet
d56f6f39c1
Use EntityFeature enums in mobile_app (#69592) 2022-04-07 18:01:19 +02:00
epenet
4c7e1fe060
Cleanup ENTITY_CATEGORIES_SCHEMA (#66549)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-04-01 09:40:43 -07:00
Erik Montnemery
5b8cf379a3
Improve mobile_app key handling (#67429) 2022-03-02 07:49:48 -08:00
Marc Mueller
ec980a574b
Improve typing [util.decorator] (#67087) 2022-02-23 20:58:42 +01:00
Erik Montnemery
911e488d48
Fix ENTITY_CATEGORIES_SCHEMA (#66108)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-02-08 14:00:53 -08:00
epenet
f083b97f9f
Import camera (#64540)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-20 13:07:05 +01:00
epenet
2c0033254b
Import cloud (#64116)
* Add type hints to cloud

* Import cloud

* Adjust smartthings tests

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-14 16:35:35 +01:00
Zac West
2df8ab865f
Allow name-only location updates for mobile_app device_tracker (#62243) 2022-01-13 09:30:36 -08:00
Paulus Schoutsen
ad8af5fc7a
Allow mobile app registrations only supporting websocket push (#63208) 2022-01-03 11:02:41 -08:00
Paulus Schoutsen
a122cbab61
Mobile app to update entity registry on re-register sensors (#58378)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-31 20:21:46 -07:00
Paulus Schoutsen
e1e864d2b6
Get the registry using the callback method (#58542) 2021-10-27 15:58:14 -07:00
Marc Mueller
184e0d7fdf
Use assignment expressions 26 (#58187) 2021-10-22 11:31:17 +02:00
Paulus Schoutsen
ab0247d112
Add entity category and state class to mobile app (#58012) 2021-10-19 12:29:22 -07:00
Ville Skyttä
8e18ca3b6e
Use HTTPStatus instead of HTTP_* int constants in mobile_app responses (#56418) 2021-10-14 08:47:13 +02:00
Ville Skyttä
9864f2ef8b
String formatting cleanups (#52937) 2021-07-13 00:12:55 +02:00
jan iversen
d76993034e
Replace HomeAssistantType with HomeAssistant for integrations m* - n* (#49566)
* Integration neato: rename HomeAssistantType to HomeAssistant.

* Integration mysensors: rename HomeAssistantType to HomeAssistant.

* Integration mobile_app: rename HomeAssistantType to HomeAssistant.

* Integration minecraft_server: rename HomeAssistantType to HomeAssistant.

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-22 22:23:36 +02:00
Paulus Schoutsen
051531d9c1
Clean up mobile app (#48607)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-01 16:22:08 -07:00
Franck Nijhof
6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +01:00
tkdrob
ab53b49d3f
Clean up constants (#46948)
* Clean up constants

* clean up humidifier constants

* fix tests

* fix prometheus tests

Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-03-02 12:52:00 +01:00
Erik Montnemery
26e7916367
Migrate mobile_app to RestoreEntity (#46391) 2021-02-11 20:18:03 +01:00
Paulus Schoutsen
57996e1942
Improve mobile app template handling (#41703)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-10-12 17:26:54 +02:00
Ville Skyttä
5e90a4d000
Use more state attribute name constants (#40428) 2020-09-21 23:03:39 +02:00
Daniel Shokouhi
d587f134ca
Reload mobile app notify service upon device name change, add device name to all webhook logs (#39364)
* Add device name to all webhook logs to help with multiple devices

* Reload notifications when we update the registration, update from rebase

* Make hassfest happy

* Adjust caplog test to accomodate log message change

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-28 15:13:43 -05:00
Anna Tikhomirova
33a05541a4
Simplify mobile app debugging by adding sender device name (#38518)
* Simplify mobile app debugging by adding sender device name.

* Reformatted webhook.py with black
2020-08-28 12:36:59 -05:00
Ville Skyttä
b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00