Commit Graph

175 Commits (b95405a7e9347d2538a8a7b47835508d44665584)

Author SHA1 Message Date
rlippmann 3a72054f93
Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
epenet 611d4135fd
Add ComponentProtocol to improve type checking (#90586) 2023-03-31 14:19:58 -04: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
J. Nick Koston c83ea297b5
Refactor zeroconf task handling (#88204)
* Refactor zeroconf task handling

- Avoid the need to create tasks for most callbacks
- Fixes the untracked task that could get unexpectedly GCed

* be consistant

* be consistant

* fix zeroconf tests

* runtime

* Revert "runtime"

This reverts commit 19e6b61837.

* precalc

* refactor

* tweak

* update tests
2023-02-15 21:44:11 -05:00
epenet a202588fd2
Add return type to json_loads (#85672)
* 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 ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
Franck Nijhof 79b52a2b41
Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
Franck Nijhof 64c2340fab
Core code styling improvements (#85963) 2023-01-15 23:00:51 +01:00
Franck Nijhof b0cee0bc46
String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
Bram Kragten 9ed31bb8df
fix integration descriptions (#81008) 2022-10-26 12:39:23 +02:00
Franck Nijhof bb287dd0ed
Integrations v2.1: Virtual integrations (#80613) 2022-10-20 23:09:06 -04:00
Paulus Schoutsen 5cb8749ae3
Fix custom components not working with integration descriptions (#80686) 2022-10-20 13:25:24 -04:00
Franck Nijhof c4bbc439a5
Integrations v2.1: Differentiating hubs, devices and services (#80524)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-19 12:41:43 +02:00
Erik Montnemery b173ae7f44
Add support for integrations v2 (#78801)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-28 11:31:48 -04:00
Erik Montnemery cce23683f1
Add additional integration_type options for integration manifests (#79193)
* Add additional integration_type options for integration manifests

* Rename integration_type internal to system
2022-09-28 14:17:39 +02:00
Erik Montnemery 27599ea0ee
Minor tweaks of hassfest and loader.py (#78929) 2022-09-22 21:54:22 -04:00
Joakim Sørensen 0caf998547
Bump awesomeversion from 22.6.0 to 22.8.0 (#77436) 2022-08-28 14:52:23 -04:00
J. Nick Koston c76dec138a
Discover new bluetooth adapters when they are plugged in (#77006) 2022-08-22 15:45:08 -10:00
J. Nick Koston 3938015c93
Add support for scanners that do not provide connectable devices (#77132) 2022-08-22 14:02:26 -04:00
J. Nick Koston bbb9443b00
Fix bluetooth integration matching with service_data_uuids and service_uuids (#75687)
* Fix bluetooth integration with service_data and service_uuids

We would only dispatch a new flow when the address was seen for
the first time or the manufacturer_data appeared in a followup
advertisement. Its also possible for the service_data and
service_uuids to appear in a followup advertisement so we
need to track these as well

* improve logging to avoid overly large messages

* improve logging to avoid overly large messages

* adjust

* adjsut

* split

* coverage

* coverage

* coverage

* coverage

* fix matcher

* more coverage

* more coverage

* more coverage

* revert switchbot changes and move to seperate PR
2022-07-24 16:39:53 -05:00
J. Nick Koston 91f2550bc3
Change manufacturer_data_first_byte to manufacturer_data_start (#75379) 2022-07-17 17:25:45 -05:00
J. Nick Koston 61cc9f5288
Consolidate executor jobs when loading integration manifests (#75176) 2022-07-14 13:06:08 -07:00
J. Nick Koston a697672944
Add bluetooth integration (#74653)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-07-08 18:55:31 -05:00
J. Nick Koston cb46bb5bfa
Revert "Partially revert "Switch loader to use json helper (#73872)" (#74077)" (#74087) 2022-06-28 09:34:56 +02:00
Franck Nijhof 21b842cf9c
Partially revert "Switch loader to use json helper (#73872)" (#74077) 2022-06-28 00:48:18 +02:00
J. Nick Koston 164eba7e5d
Switch loader to use json helper (#73872) 2022-06-22 21:57:38 -05:00
Raman Gupta ae01ec02e2
Allow custom integrations to support application_credentials platform (#71129) 2022-05-01 16:26:22 -07:00
Paulus Schoutsen 3213091b8d
Add integration type (#68349) 2022-03-20 20:38:13 -07:00
Marc Mueller be7ef6115c
Make TypeVars private (1) (#68205) 2022-03-17 18:52:38 +01:00
J. Nick Koston 076fe97110
Strict typing for dhcp (#67361) 2022-02-28 18:49:44 -10:00
Marc Mueller 8d2fb72cc3
Add type ignore error codes [core] (#66773) 2022-02-17 23:09:22 -08:00
J. Nick Koston f069a37f7d
Allow integrations to request dhcp discovery flows for registered devices (#66528) 2022-02-15 11:02:52 -06:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
Paulus Schoutsen 24546dfdf9
Catch all exceptions on import component/platform (#64930) 2022-01-25 20:39:32 -08:00
Marc Mueller 12757a8cd2
Update typing - collections.abc (1) (#63933)
* Update typing - collections.abc (1)

* Additional typing updates
2022-01-12 07:56:35 +01:00
Marc Mueller 240c9979c7
Move `disallow-any-generics` to mypy.ini (#63917) 2022-01-11 13:33:25 -08:00
Marc Mueller d3b7bd25ef
Update typing (1) (#63922) 2022-01-11 21:26:03 +01:00
Tobias Sauerwein 2c904c0974
Bump mypy to 0.930 (#62642)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-12-27 17:55:17 +01:00
Ruslan Sayfutdinov 55f4962c06
Fix pylint plugin which checks relative imports (#62693) 2021-12-23 11:14:47 -08:00
J. Nick Koston 615872a5d1
Align zeroconf matching with ZeroconfServiceInfo (#62133) 2021-12-19 02:09:21 -06:00
Paulus Schoutsen cd3e51b3e7
Ensure domain is correct format (#58429) 2021-10-25 15:56:07 -07:00
Marc Mueller 238b488642
Use assignment expressions 03 (#57710) 2021-10-17 20:08:11 +02:00
Ruslan Sayfutdinov a9ed4fa405
Bump awesomeversion to 21.8.1 (#55817) 2021-09-11 11:40:46 -07:00
J. Nick Koston 0403ea715e
Add known devices to USB Vendor / Product IDs (#54986)
Co-authored-by: kpine <keith.pine@gmail.com>
2021-08-21 21:56:49 +02:00
J. Nick Koston dc74a52f58
Add support for USB discovery (#54904)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 14:04:18 -05:00
Daniel Hjelseth Høyer fbad453c89
Pylint 2.9.3 (#52972)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Joakim Sørensen 5d6b6deed4
Move version validation to resolver (#51311) 2021-05-31 15:32:03 -07:00
Ruslan Sayfutdinov 391b2f8ccd
Add missing return type in Core constructors (#50884) 2021-05-20 18:53:29 +03:00
J. Nick Koston a43561e3e6
Ensure startup can proceed if async_get_integration raises (#50799)
* Ensure startup can proceed if async_get_integration raises

There were cases where the event would never get set and
startup would deadlock because the second attempt to load
the integration would block forever

* pylint

* reorder
2021-05-17 17:32:05 -05:00
Joakim Sørensen 2f10f59717
Block custom integrations with missing or invalid version (#49916) 2021-05-17 15:48:41 +02:00