Commit Graph

8 Commits (cdc93d7110fac0d8d1a5aaae1d38a287024f5654)

Author SHA1 Message Date
Xiaonan Shen 394194d1e6
Add switch to pi_hole integration (#35605)
Co-authored-by: Ian <vividboarder@gmail.com>
2020-07-17 23:19:01 -07:00
Xiaonan Shen b4489e132c
Add DataUpdateCoordinator to pihole (#36684)
Co-authored-by: Ian <vividboarder@gmail.com>
2020-06-22 18:47:37 -07:00
Xiaonan Shen ce99fa8c02
Add config flow to pi_hole integration (#35442)
* Add config flow to pi-hole

* Add config flow tests

* Change PlatformNotReady to ConfigEntryNotReady

* Improve config flow

* Add @shenxn as codeowner

* Use entity_id as unique id

* Remove .get with [] for required fields

* Remove unique id from config flow

* Replace some strings with references

* Fix api_key string

* Fix service api_key check

* Remove unused DuplicatedNameException
2020-05-13 09:25:06 -04:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
John Luetke 7c42f4b45b (Re)Add support for multiple Pi-Holes (#27569)
* Update configuration schema to support multiple Pi-holes

* Construct sensors for each configured Pi-hole

* Ensure each Pi-hole has a unique name

* Update services to handle multiple Pi-holes

* Update tests for multiple configurations

* Refactor tests to support service testing

* Fix else-raise per pyliunt

* Per code review, add all entities in a single call

* Per code review, add the default name as default.

* Per code review, add cv.ensure_list to prevent breaking change

* Per code review, move name validation to schema

* Remove default name

* Per code review, validate api_key in schema definition

* Per code review, rename variables

* Per code review, use list comprehension

* Ensure unique slug names in config validation

* Per code review, refactor to CoroutineMock

* Fix adding sensor entities

* Per code review, refactor mock function creation

* Per code review, refactor mock function return values
2019-12-12 19:43:49 +01:00
John Luetke 245e51df7a Add Pi-hole enable and disable services (#27055)
* Add service to disable pihole

* Add service to enable pihole

* Redefine optional string validator

* code review changes

* Change service parameter to timedelta

* code review changes
2019-09-29 20:35:56 -04:00
John Luetke 757482ee85 Refactor pihole integration (#25837)
* Adds tests for pi_hole integration

* Refactor pi_hole component to an integration supporting multiple platforms

* Adds mock of Hole dependency

* Aborts platform setup when discovery_info is none

* Removes use of monitored_conditions

* Adds integration setup test

* Removes PlatformNotReady check

* Adds sensor test

* Code review updates

* Refactor tests to assert state through hass

* Reorder imports
2019-09-03 16:18:06 -07:00