Commit Graph

15 Commits (148a7ff50cd2fbd9b05c2e8928459b546eeb98ef)

Author SHA1 Message Date
springstan 7de1fe7416
Use percentage constant in more integrations (#40165) 2020-09-19 10:30:22 -05:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick Koston 1b593e3169
Prevent nut config flow error when checking ignored entries (#38372) 2020-07-29 23:20:19 +02:00
Franck Nijhof 683d960fa5
Add discovery to NUT integration (#36827)
* Add discovery to NUT integration

* implement async_step_zeroconf

* Update test to make sure unique id not set

* Remove host/port import when coming from discovery, add title placeholders

* fix mis-paste

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-19 17:33:01 +02:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07: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 188f3e35fd
Add tests for additional nut ups models (#34240)
* Add NUT tests for an Eaton 5E650I UPS

* add a test to make sure multiple ups get setup

* Add a few more upses

* fix missing status key

* cover

* Force CI run
2020-04-15 20:28:03 -05: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
springstan 9f713dac7f
Use UNIT_PERCENTAGE constant (#34054) 2020-04-11 22:53:48 +02:00
J. Nick Koston 6e6ebb9495
Add tests for various NUT upses (#34034) 2020-04-11 18:17:57 +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