Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Re)Add support for multiple Pi-Holes #27569

Merged
merged 20 commits into from
Dec 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
060ee1d
Update configuration schema to support multiple Pi-holes
johnluetke Sep 30, 2019
32abe75
Construct sensors for each configured Pi-hole
johnluetke Sep 30, 2019
091c181
Ensure each Pi-hole has a unique name
johnluetke Oct 2, 2019
254164b
Update services to handle multiple Pi-holes
johnluetke Oct 2, 2019
ecba3f4
Update tests for multiple configurations
johnluetke Oct 2, 2019
4241cd4
Refactor tests to support service testing
johnluetke Oct 3, 2019
8fc853e
Fix else-raise per pyliunt
johnluetke Oct 13, 2019
97b2e19
Per code review, add all entities in a single call
johnluetke Nov 9, 2019
4fb5b5f
Per code review, add the default name as default.
johnluetke Nov 9, 2019
1a7aed4
Per code review, add cv.ensure_list to prevent breaking change
johnluetke Nov 9, 2019
a55dcdd
Per code review, move name validation to schema
johnluetke Nov 9, 2019
fa275b6
Remove default name
johnluetke Nov 10, 2019
ddae0fe
Per code review, validate api_key in schema definition
johnluetke Nov 10, 2019
d002897
Per code review, rename variables
johnluetke Nov 10, 2019
97e11ba
Per code review, use list comprehension
johnluetke Nov 10, 2019
8d9dc64
Ensure unique slug names in config validation
johnluetke Nov 16, 2019
5148a90
Per code review, refactor to CoroutineMock
johnluetke Nov 17, 2019
e48bd54
Fix adding sensor entities
johnluetke Nov 17, 2019
28b9fce
Per code review, refactor mock function creation
johnluetke Nov 23, 2019
c2f1dc3
Per code review, refactor mock function return values
johnluetke Nov 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix adding sensor entities
  • Loading branch information
johnluetke committed Nov 23, 2019
commit e48bd543d46ec45566bc08c79c3b5951894ba1b8
5 changes: 4 additions & 1 deletion homeassistant/components/pi_hole/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=

sensors = []
for pi_hole in hass.data[PIHOLE_DOMAIN].values():
sensors = [PiHoleSensor(pi_hole, sensor_name) for sensor_name in SENSOR_LIST]
for sensor in [
PiHoleSensor(pi_hole, sensor_name) for sensor_name in SENSOR_LIST
]:
sensors.append(sensor)

async_add_entities(sensors, True)

Expand Down