Commit graph

127 commits

Author SHA1 Message Date
Lukasz Szmit
ceaf8f2402
Add support for payload_template in rest component (#107464)
* Add support for payload_template in rest component

* Update homeassistant/components/rest/schema.py

* Update homeassistant/components/rest/data.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-18 15:22:58 +02:00
Sid
a5b609f081
Enable ruff TRY401 (#114395)
* Enable ruff TRY401

* fix tests
2024-03-29 07:20:36 +01:00
Joost Lekkerkerker
1191032b08
Add service icons to REST (#113346) 2024-03-14 14:01:41 +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
a033574ee2
Add empty line after module docstring [r] (#112703) 2024-03-08 15:05:07 +01:00
J. Nick Koston
a698bd5800
Migrate rest to use eager tasks for setup (#112166)
The refresh tasks will avoid one iteration of the event loop
to start fetching data

The load tasks will likely never suspend and avoid being
scheduled on the event loop
2024-03-04 06:26:55 -05:00
J. Nick Koston
f44b759a99
Import rest in the executor to avoid blocking the event loop (#111804)
fixes #111803

`2024-02-28 15:43:53.708 DEBUG (MainThread) [homeassistant.loader] Component rest import took 1.646 seconds (loaded_executor=False) `
2024-02-29 10:37:36 -05:00
Marc Mueller
438d3b01b9
Use builtin TimeoutError [o-s] (#109682) 2024-02-05 12:14:37 +01:00
vexofp
c5a3e58994
Pass timeout to httpx in RESTful Switch (#105364)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-19 10:47:42 -10:00
vexofp
327016eaeb
Accept HTTP 200 through 206 as success for RESTful Switch (#105358) 2023-12-09 12:45:33 -10:00
Marc Mueller
2518fbc973
Update jsonpath to 0.82.2 (#100252) 2023-09-13 01:41:50 +02:00
G Johansson
61c17291fb
Move TemplateEntity to template (#98957)
* Move TemplateEntity to template

* Rename template_entity in helpers
2023-08-24 15:37:04 +02:00
Jan Bouwhuis
a39af8aff9
Fix rest debug logging (#98649)
Correct rest debug logging
2023-08-18 23:03:56 +02:00
G Johansson
268e5244f0
Cleanup ManualTriggerSensorEntity (#98629)
* Cleanup ManualTriggerSensorEntity

* ConfigType
2023-08-18 20:19:17 +02:00
Marc Mueller
063ce9159d
Use asyncio.timeout [o-s] (#98451) 2023-08-15 17:21:49 +02:00
G Johansson
ed18c6a013
Refactor Rest Switch with ManualTriggerEntity (#97403)
* Refactor Rest Switch with ManualTriggerEntity

* Fix test

* Fix 2

* review comments

* remove async_added_to_hass

* update on startup
2023-08-15 11:43:47 +02:00
epenet
c62081430b
Refactor JSON attribute parsing in rest (#97526)
* Refactor JSON attribute parsing in rest

* Early return
2023-08-11 11:00:55 +02:00
G Johansson
aacb8aecfc
Refactor Rest Sensor with ManualTriggerEntity (#97396)
* ManualTriggerEntity for rest sensor

* add availability test

* review comments

* last fixes
2023-08-10 21:46:56 +02:00
G Johansson
4531dbbe62
Refactor Rest Binary sensor with ManualTriggerEntity (#97400)
* Refactor Rest Binary sensor w/ ManualTriggerEntity

* test availability

* review comments

* Use super

* Fix config
2023-08-10 12:59:23 +02:00
Marc Mueller
91a83e1ad2
Fix httpx DeprecationWarning (#97625) 2023-08-02 20:29:36 +02:00
epenet
787486b68d
Remove myself from rest codeowners (#97528) 2023-07-31 12:50:44 +02:00
Joost Lekkerkerker
b367c95c81
Add more common translations (#96429)
* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations

* Add common translations
2023-07-12 22:00:05 -04:00
Franck Nijhof
62fe4957c9
Migrate integration services (Q-S) to support translations (#96378) 2023-07-12 01:18:22 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
Marc Mueller
86792fcc2f
Update mypy to 1.4.0 (#94987) 2023-06-21 16:12:51 +02:00
epenet
580b09d0f2
Refactor XML parsing in rest (#94268)
* Refactor XML parsing in rest

* Adjust caplog check

* Adjust

* Rename

* Simplify
2023-06-15 09:15:25 +02:00
epenet
949e8f7b13
Migrate rest notify to httpx (#90769) 2023-05-11 08:26:16 +01:00
epenet
802e907a35
Migrate rest switch to httpx (#90768) 2023-05-05 14:43:39 +02:00
epenet
603aa759d3
Fix KeyError in rest (#92464) 2023-05-05 09:05:31 +02:00
Michael
323d16cc21
Add ssl_cipher_list option to rest (#91078) 2023-04-15 11:22:41 -10:00
Michael
0916701a0b
Catch ssl errors in rest (#91074)
* catch ssl.SSLError

* add test

* fail setup on ssl error

* adjust tests
2023-04-12 06:51:41 +02:00
epenet
dfa0b5439b
Add myself to rest code owners (#90770) 2023-04-04 11:36:36 +02:00
nono
9cab05c4b9
Fix Rest switch init was not retrying if unreachable at setup (#90627)
* Fix Rest switch init was not retrying if unreachable at setup

* pass error log to platformnotready
prevents spamming the same message in logs.
2023-04-01 17:45:24 +02:00
Olivier Ouellet
1c465b5ad0
Add encoding configuration setting to REST and Scape (#90254)
* Create new config parameter for default character encoding if no character encoding is declared

* Changes suggested by gjohansson-ST

* Added config flow for scape

* Removed "character"

* Change to create_async_httpx_client

* Remove CONF_ENCODING from Scrape SENSOR_SCHEMA

* Debug scrape test
2023-03-28 12:42:31 +02:00
epenet
ba23816a0c
Inverse json import logic (#88099)
* 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
Erik Montnemery
5dfb9cddd6
Sort manifests 8 (#87029) 2023-02-08 20:13:46 +01:00
epenet
b854dd99fc
Add rest to strict-typing (#86149)
* Add type hints to rest notify

* Add rest to strict-typing
2023-02-07 15:48:16 +01:00
epenet
ca8cc284ed
Add hints to get_service in rest (#86703) 2023-01-26 11:08:06 +01:00
epenet
1baa5c12c0
Fix rest schema (#81857) 2022-11-11 10:08:26 -06:00
epenet
c585817e67
Adjust REST schema validation (#81723)
fixes undefined
2022-11-08 11:18:58 +01:00
epenet
f479b2385e
Add type hints to rest switch (#81307) 2022-11-07 14:02:49 +01:00
epenet
fee3898f64
Use _attr_is_on in rest (#81305) 2022-10-31 15:36:43 +01:00
epenet
fbc8f0a2cf
Improve type hints in rest integration (#81291) 2022-10-31 14:06:09 +01:00
epenet
3d42a46871
Align Scrape resource model with Rest integration (#81074) 2022-10-27 17:48:35 +02:00
epenet
a70f9b8995
Add type hints to rest integration (#80546) 2022-10-19 14:35:23 +02:00
epenet
599d61a4da
Fix payload in rest (#80544) 2022-10-18 17:15:08 +02:00
Joakim Sørensen
3655958d26
Seperate timeout errors in rest requests (#78710) 2022-09-18 21:38:27 +02:00
Erik Montnemery
c37d294d12
Use reload helper to reload rest component (#78491) 2022-09-15 11:02:37 +02:00
epenet
996bcbdac6
Make EntityComponent generic (#78473) 2022-09-14 14:16:23 -04:00
epenet
a82484d7a7
Use attributes in rest base entity (#77903) 2022-09-07 09:40:52 +02:00