Commit graph

26 commits

Author SHA1 Message Date
J. Nick Koston
cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
ollo69
1747061820
Enable NUT strict typing (#71913) 2022-05-16 18:51:30 -05:00
epenet
a63e5c7ded
Add type hints for config entry update listeners (#65412) 2022-02-02 03:36:04 -06:00
ollo69
7d1de80926
Ignore serial number "blank" from NUT (#63066) 2021-12-30 10:25:44 +01:00
ollo69
cd5fe11b44
Use async_on_unload for Nut update_listener (#61589) 2021-12-13 21:42:25 +01:00
ollo69
21f92f6286
Add Nut device explicitly to the device registry (#59525)
* Add Nut device explicitly to the device registry

* Restore resources in data and remove unused string
2021-11-12 11:10:40 +01:00
ollo69
6cba03aa4a
Remove resources selection from Nut config flow (#59450)
* Remove resources selection from Nut config flow

* Code clean-up

* Requested changes

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-10 13:49:05 +01:00
ollo69
ea6504dfa2
Fix Nut resources option migration (#59020)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-04 14:26:17 +01:00
ollo69
fe0291012c
Use attr_device_info and add init tests for nut (#57725) 2021-10-17 07:43:15 -10:00
ollo69
827501659c
Nut: Use coordinator data, code cleanup and add test coverage (#57643) 2021-10-13 16:05:06 -10:00
ollo69
b54fc0229d
Use entity_registry_enabled_default for Nut sensors (#56854) 2021-10-13 11:33:03 -10:00
Tomasz
e9f6bc7364
Add missing return type to async_unload_entry and async_setup_entry (#57115) 2021-10-06 10:48:11 +02:00
tkdrob
d1c4d0de49
Use bool annotations for setup entries (#51166) 2021-05-27 17:39:06 +02:00
J. Nick Koston
3f3f77c6e6
Reduce config entry setup/unload boilerplate N-P (#49777) 2021-04-27 20:42:21 +02:00
Franck Nijhof
af80ca6795
Clean up superfluous integration setup - part 5 (#49296) 2021-04-16 09:22:56 -07:00
J. Nick Koston
a851bff95a
Create async_config_entry_first_refresh to reduce coordinator boilerplate (#48451) 2021-03-29 12:51:39 -10:00
Quentame
198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
J. Nick Koston
50105eed74
Handle UPS disconnects in NUT (#35758) 2020-05-18 16:23:05 +02:00
J. Nick Koston
abae48c287
Use config entry id for unique id if serial number is missing (#34154) 2020-04-16 14:59:30 -07:00
J. Nick Koston
173d7fa060
Handle all zero serial numbers in NUT (#34045)
* Handle all zero serial numbers in NUT

* Add additional nut tests

* Update homeassistant/components/nut/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* remove re

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-12 15:29:35 -07:00
J. Nick Koston
24c45bfd84
Restore ability to change the scan interval in the NUT (#33996)
* Support changing the scan interval in the NUT options flow

* use dict.items()
2020-04-11 19:37:34 -05:00
J. Nick Koston
c8aa55439f
Undo NUT update listener on config reload (#33986) 2020-04-11 00:55:33 +02:00
J. Nick Koston
8be7cb4539
Update nut to use DataUpdateCoordinator (#33831)
* Convert nut to use DataUpdateCoordinator

* Adjust per review

* ups_list is a dict with {id: name, ...}
2020-04-08 18:26:10 -07:00
J. Nick Koston
7383e81609
Convert nut to a multi step config flow (#33803)
* Convert nut to a multi step config flow

* Users can now choose the ups they want in
step 2 (or skipped if only one)

* Users can now select the resources they want
to monitor based on what is actually available
on the device

* CONF_NAME has been removed as we now get the
name from NUT

* Device classes have been added which allows
the battery charge state to be seen in the
devices UI

* Remove update_interval as its for a followup PR

* explict

* reduce

* fix bug, add tests for options flow

* Test for dupe import

* Test for dupe import

* Call step directly

* Update homeassistant/components/nut/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-08 11:45:45 -05:00
J. Nick Koston
cc443ff37a
Add config flow for nut (#33457)
* Convert nut to config flow

* Add a test for importing

* lint

* Address review items (part 1)

* Address review items (part 1)

* Cleanup unique id handling

* Update tests for new naming scheme

* No unique id, no device_info

* Remove sensor types

* Update tests to use resources that still exist
2020-03-31 19:08:27 -07:00
Paulus Schoutsen
f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00