Commit graph

277 commits

Author SHA1 Message Date
Erik Montnemery
d1afcd773f
Revert "Cache entity properties that are never expected to change in the base class" ()
Revert "Cache entity properties that are never expected to change in the base class ()"

This reverts commit 042776ebb8.
2023-09-15 11:25:24 +02:00
J. Nick Koston
042776ebb8
Cache entity properties that are never expected to change in the base class () 2023-09-14 17:48:48 -05:00
J. Nick Koston
fdb9ac20c3
Migrate mobile_app to use json helper () 2023-09-11 12:08:48 -05:00
J. Nick Koston
fed1cab847
Fix mobile app dispatcher performance ()
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
Ville Skyttä
34b47a2597
Remove unnnecessary pylint configs from components [m-r]* () 2023-08-24 00:56:50 +02:00
Marc Mueller
71d985e4d6
Use asyncio.timeout [i-n] () 2023-08-15 14:32:15 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry ()
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Joost Lekkerkerker
d56484e2d6
Fix docstrings in mobile app device tracker () 2023-08-07 18:41:08 +02:00
J. Nick Koston
51a7df162c
Avoid regenerating the mobile app schema every time a webhook is called ()
Avoid regnerating the mobile app schema every time a webhook is called
2023-07-17 08:42:46 +02:00
Erik Montnemery
fd08cfb074
Add empty config schema to mobile_app () 2023-06-01 12:17:55 +02:00
J. Nick Koston
48b93e03ee
Cache transient templates compiles provided via api ()
* Cache transient templates compiles provided via api

partially fixes  (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 ()
* 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
epenet
ba23816a0c
Inverse json import logic ()
* Fix helpers and util

* Adjust components

* Move back errors

* Add report

* mypy

* mypy

* Assert deprecation messages

* Move test_json_loads_object

* Adjust tests

* Fix rebase

* Adjust pylint plugin

* Fix plugin

* Adjust references

* Adjust backup tests
2023-02-16 11:37:57 +01:00
epenet
b21bf8763e
Fix mobile app regression accepting sensor states ()
* Fix mobile app regression accepting sensor states

* Adjust tests
2023-02-15 07:17:19 -05:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ()
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Erik Montnemery
1d64ba9d34
Sort manifests 6 () 2023-02-08 20:38:43 +01:00
epenet
a202588fd2
Add return type to json_loads ()
* Add JSON type definitions

* Sample use

* Keep mutable for a follo-up PR (avoid dead code)

* Use list/dict

* Remove JsonObjectType

* Remove reference to Union

* Cleanup

* Improve rest

* Rename json_dict => json_data

* Add docstring

* Add type hint to json_loads

* Add cast

* Move type alias to json helpers

* Cleanup

* Create and use json_loads_object

* Make error more explicit and add tests

* Use JsonObjectType in conversation

* Remove quotes
2023-02-07 17:21:55 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core ()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
epenet
f6c76372ce
Ensure hass is typed ()
* Ensure hass is typed

* Adjust pilight

* Adjust homeassistant scene

* Adjust hassio

* Adjust gree

* Adjust google_maps

* Adjust energyzero

* Adjust harmony

* Adjust mobile_app
2023-02-04 12:52:59 -05:00
Paulus Schoutsen
e0f8b5bbd1
Fix some mobile app sensor registration/update issues ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-30 20:08:19 +01:00
epenet
0d579f6ac3
Add hints to get_service in integrations (2/2) () 2023-01-26 16:55:57 +01:00
Paulus Schoutsen
9631146745
Add conversation mobile app webhook ()
* 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 () 2022-12-22 13:35:47 +01:00
epenet
a6ddac9004
Use UnitOfTemperature in integrations (i-m) () 2022-12-20 18:30:46 +01:00
GitHub Action
1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00
Joris Pelgröm
34fd64addf
Fix mobile_app returning cloud URL when not subscribed ()
fixes undefined
2022-12-04 21:10:26 -05:00
GitHub Action
0d1f476bee [ci skip] Translation update 2022-12-01 00:33:36 +00:00
Paulus Schoutsen
7dff44b3e9
Fix mobile app passing incorrect device ID when scanning tag () 2022-11-28 08:35:57 -05:00
epenet
615f7204cb
Add type hints to mobile app webhooks () 2022-11-16 16:07:43 +01:00
epenet
00f4933e72
Import tag from homeassistant.components () 2022-11-16 07:09:46 +01:00
epenet
af9ac9022b
Import tag via hass.components in mobile_app ()
* Import tag via hass.components in mobile_app

* Update webhook.py
2022-11-15 18:27:37 +01:00
epenet
2214fff3b4
Cleanup device_tracker imports () 2022-10-28 17:40:37 +02:00
epenet
2c43606922
Add websocket type hints in components ()
* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-20 13:41:14 +02:00
epenet
60640b4436
Add websocket type hints in components () 2022-10-18 22:15:23 -04:00
epenet
b5402f9b57
Import device tracker constants from root () 2022-09-12 20:50:44 -04:00
epenet
7871a517a8
Import constants from root () 2022-09-12 18:53:05 +02:00
epenet
0ce526efe1
Import logbook constants from root () 2022-09-12 17:53:06 +02:00
epenet
6355e682fa
Improve entity type hints [m] () 2022-09-05 10:59:36 +02:00
Doug Hoffman
01c200e11d
Fix issue caused by restoring datetime value from mobile app ()
* Only pass strings to dt_util.parse_datetime()

* Update homeassistant/components/mobile_app/sensor.py

* Update sensor.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-08-29 12:19:44 +02:00
Erik Montnemery
0ed265e2be
Correct restoring of mobile_app sensors () 2022-08-17 10:53:05 +02:00
Marc Mueller
cf7c716bda
Fix implicit Optional [core] () 2022-08-13 18:46:08 +02:00
GitHub Action
6e03b12a93 [ci skip] Translation update 2022-08-13 00:25:00 +00:00
GitHub Action
cb46441b74 [ci skip] Translation update 2022-08-05 00:28:51 +00:00
GitHub Action
81e3ef03f7 [ci skip] Translation update 2022-08-02 00:27:42 +00:00
Marc Mueller
2b1e1365fd
Add StrEnum for device_tracker SourceType ()
Add StrEnum for device_tracker SourceType
2022-07-29 13:09:03 +02:00
epenet
16900dcef1
Make Store a generic class () 2022-07-09 22:32:57 +02:00
J. Nick Koston
cd03c49fc2
Wait for config entry platform forwards () 2022-07-09 17:27:42 +02:00
GitHub Action
405d323709 [ci skip] Translation update 2022-07-08 00:27:47 +00:00
J. Nick Koston
b5f6f785d5
Switch mobile_app to use the json helper () 2022-06-22 22:32:48 -04:00
J. Nick Koston
0248a8710f
Always pass the source of the trigger for logbook context messages () 2022-05-23 13:35:45 -05:00