Commit graph

93 commits

Author SHA1 Message Date
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
epenet
6f564e4f51
Improve entity type hints [r] (#77874) 2022-09-06 09:47:35 +02:00
Erik Montnemery
146ff83a16
Migrate rest binary_sensor and switch to TemplateEntity (#73307) 2022-06-28 13:53:38 -07:00
J. Nick Koston
9a0b3796d3
Bump xmltodict to 0.13.0 (#73974)
Changelog: https://github.com/martinblech/xmltodict/blob/v0.13.0/CHANGELOG.md
2022-06-26 12:38:17 +02:00
J. Nick Koston
ab30d38469
Switch rest to use the json helper (#73867) 2022-06-22 20:12:48 -05:00
Erik Montnemery
5987266e56
Refactor template entity to allow reuse (#72753)
* Refactor template entity to allow reuse

* Fix schema and default name

* Add tests

* Update requirements

* Improve test

* Tweak TemplateSensor initializer

* Drop attributes and availability from TemplateEntity

* Use rest sensor for proof of concept

* Revert changes in SNMP sensor

* Don't set _attr_should_poll in mixin class

* Update requirements
2022-06-08 15:55:49 +02:00
epenet
64e7e62aa0
Add setup type hints [r] (#63472)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-05 16:37:47 +01:00
epenet
822ac203c3
Add sensor setup type hints [r] (#63312)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:08:34 +01:00
epenet
545b10a711
Add binary_sensor setup type hints [o-r] (#63270)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 11:35:02 +01:00
Sebastian Lövdahl
53f4a3d8bc
Use Platform constants all over the place 3/3 (#62954) 2021-12-28 21:24:27 +01:00
epenet
a19c95e4bd
Ensure service calls are typed [o-r] (#62920)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-28 13:10:17 +01:00
Kristján Bjarni
38723b277e
Added XML RSS as Content-Type (#62822) 2021-12-27 10:49:38 +01:00
Erik Montnemery
aa36dde148
Correct rest sensor configured to generate timestamps (#61429) 2021-12-10 09:59:27 -08:00
Paulus Schoutsen
17cf53677c
Rest fixes (#61296) 2021-12-08 14:35:50 -08:00
J. Nick Koston
aca2c3a27a
Restore rest integration ability to follow http redirects (#61293) 2021-12-08 22:03:07 +01:00
Paulus Schoutsen
3223332c1e
Use correct template parameter in Rest template rendering (#61269) 2021-12-08 12:19:22 -08:00
Jan Bouwhuis
17a542689f
Fix pvoutput template use and REST integer parsing (#61171)
* Fix pvoutput template use and REST integer parsing

* revert accepting templates as input
2021-12-08 19:32:25 +01:00
J. Nick Koston
10d6247fee
Bump to aiohttp 3.8.0 (#58974) 2021-11-04 10:07:50 -05:00
Marc Mueller
a48ddcadd4
Use assignment expressions 31 (#58715) 2021-10-30 16:29:07 +02:00
Chris Browet
b1b782419b
Add REST sensor/binary_sensor/switch templated headers & params (#54426) 2021-10-29 16:36:47 -05:00
Ville Skyttä
5626cc4524
Use http.HTTPStatus in components/r* (#58288) 2021-10-23 20:53:39 +02:00
Chris Browet
1867d24b18
Add state_class support to Rest (#58026) 2021-10-22 13:48:13 -07:00
Marc Mueller
69e413ac1e
Update pylint to 2.10.1 (#54963)
* Update pylint to 2.10.0

* useless-suppression

* Consider-using-tuple

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Use dict.items()

* Add pylint disable

* Use pylint 2.10.1

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-21 10:41:23 +02:00
Ville Skyttä
939fde0a50
ConfigType and async_setup/setup type hint improvements (#54739) 2021-08-18 13:22:05 +02:00
Erik Montnemery
e558b3463e
Move temperature conversions to sensor base class (6/8) (#54476)
* Move temperature conversions to entity base class (6/8)

* Fix tests
2021-08-12 17:40:55 +02:00
tkdrob
2d5f5bfa9f
Add targets and selectors for services (P-R) (#50628) 2021-05-14 22:07:17 -07:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
J. Nick Koston
30382c3dbe
Limit log spam from rest and include reason in platform retry (#48666)
- Each retry was logging the error again
- Now we set the cause of the PlatformNotReady to allow Home Assistant to log as needed
2021-04-04 20:26:18 -07:00
Erik Montnemery
64bc9a8196
Migrate integrations r-s to extend SensorEntity (#48215) 2021-03-22 19:54:14 +01:00
J. Nick Koston
fea0e39fa0
Reduce rest setup code (#48062)
- Switch to storing each platform config/rest data in a list
2021-03-18 09:55:38 +01:00
J. Nick Koston
dd56cc8010
Fix rest sensor data misalignment with multiple sensors (#48043)
If there were multiple rest data sources, the index needed
to be incremented by type instead of by data source/type
2021-03-17 22:47:42 +01:00
Erik Montnemery
14ff6d4d1f
Update integrations p-s to override extra_state_attributes() (#47759) 2021-03-11 21:23:20 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
J. Nick Koston
2f3c2f5f4d
Add support for using a single endpoint for rest data (#46711) 2021-02-19 21:44:15 -08:00
Franck Nijhof
a80921ab65
Minor service definition tweaks (#46741) 2021-02-18 17:14:36 +01:00