{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/26700","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/26700/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/26700/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/26700/events","html_url":"https://github.com/home-assistant/home-assistant/issues/26700","id":495087942,"node_id":"MDU6SXNzdWU0OTUwODc5NDI=","number":26700,"title":"Refactor pihole integration","user":{"login":"daveyrb","id":6515331,"node_id":"MDQ6VXNlcjY1MTUzMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/6515331?v=4","gravatar_id":"","url":"https://api.github.com/users/daveyrb","html_url":"https://github.com/daveyrb","followers_url":"https://api.github.com/users/daveyrb/followers","following_url":"https://api.github.com/users/daveyrb/following{/other_user}","gists_url":"https://api.github.com/users/daveyrb/gists{/gist_id}","starred_url":"https://api.github.com/users/daveyrb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveyrb/subscriptions","organizations_url":"https://api.github.com/users/daveyrb/orgs","repos_url":"https://api.github.com/users/daveyrb/repos","events_url":"https://api.github.com/users/daveyrb/events{/privacy}","received_events_url":"https://api.github.com/users/daveyrb/received_events","type":"User","site_admin":false},"labels":[{"id":1282918587,"node_id":"MDU6TGFiZWwxMjgyOTE4NTg3","url":"https://api.github.com/repos/home-assistant/home-assistant/labels/integration:%20pi_hole","name":"integration: pi_hole","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"fabaff","id":116184,"node_id":"MDQ6VXNlcjExNjE4NA==","avatar_url":"https://avatars0.githubusercontent.com/u/116184?v=4","gravatar_id":"","url":"https://api.github.com/users/fabaff","html_url":"https://github.com/fabaff","followers_url":"https://api.github.com/users/fabaff/followers","following_url":"https://api.github.com/users/fabaff/following{/other_user}","gists_url":"https://api.github.com/users/fabaff/gists{/gist_id}","starred_url":"https://api.github.com/users/fabaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabaff/subscriptions","organizations_url":"https://api.github.com/users/fabaff/orgs","repos_url":"https://api.github.com/users/fabaff/repos","events_url":"https://api.github.com/users/fabaff/events{/privacy}","received_events_url":"https://api.github.com/users/fabaff/received_events","type":"User","site_admin":false},"assignees":[{"login":"fabaff","id":116184,"node_id":"MDQ6VXNlcjExNjE4NA==","avatar_url":"https://avatars0.githubusercontent.com/u/116184?v=4","gravatar_id":"","url":"https://api.github.com/users/fabaff","html_url":"https://github.com/fabaff","followers_url":"https://api.github.com/users/fabaff/followers","following_url":"https://api.github.com/users/fabaff/following{/other_user}","gists_url":"https://api.github.com/users/fabaff/gists{/gist_id}","starred_url":"https://api.github.com/users/fabaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabaff/subscriptions","organizations_url":"https://api.github.com/users/fabaff/orgs","repos_url":"https://api.github.com/users/fabaff/repos","events_url":"https://api.github.com/users/fabaff/events{/privacy}","received_events_url":"https://api.github.com/users/fabaff/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2019-09-18T09:02:01Z","updated_at":"2019-09-19T12:48:24Z","closed_at":null,"author_association":"NONE","body":"<!-- READ THIS FIRST:\r\n- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/\r\n- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/home-assistant/releases\r\n- Frontend issues should be submitted to the home-assistant-polymer repository: https://github.com/home-assistant/home-assistant-polymer/issues\r\n- iOS issues should be submitted to the home-assistant-iOS repository: https://github.com/home-assistant/home-assistant-iOS/issues\r\n- Do not report issues for integrations if you are using a custom integration: files in <config-dir>/custom_components\r\n- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests\r\n- Provide as many details as possible. Paste logs, configuration sample and code into the backticks. Do not delete any text from this template!\r\n-->\r\n\r\n**Home Assistant release with the issue:**\r\n0.99.0b3\r\n<!--\r\n- Frontend -> Developer tools -> Info\r\n- Or use this command: hass --version\r\n-->\r\n\r\n\r\n**Last working Home Assistant release (if known):**\r\n0.98.5\r\n\r\n**Operating environment (Hass.io/Docker/Windows/etc.):**\r\nDocker\r\n<!--\r\nPlease provide details about your environment.\r\n-->\r\n\r\n**Component/platform:**\r\n<!--\r\nPlease add the link to the documentation at https://www.home-assistant.io/components/ of the component/platform in question.\r\n-->\r\nhttps://github.com/home-assistant/home-assistant/pull/25837\r\n\r\n**Description of problem:**\r\nI currently have two Raspberry Pi's running Pi-Hole for resillience.\r\nI then add both sensors together in a template sensor to create totals for the below from both Pi-Holes\r\n    - ads_blocked_today\r\n    - ads_percentage_today\r\n    - dns_queries_today\r\n\r\nWith the new configuration I can only enter one host.\r\n\r\n\r\n**Problem-relevant `configuration.yaml` entries and (fill out even if it seems unimportant):**\r\n```yaml\r\n###############################################################################\r\n# Pi Hole DNS Sensors \r\n###############################################################################\r\n- platform: pi_hole\r\n  host: !secret dns_1\r\n  location: !secret pi_hole_location\r\n  monitored_conditions:\r\n    - ads_blocked_today\r\n    - ads_percentage_today\r\n    - dns_queries_today\r\n    #- domains_being_blocked\r\n    #- queries_cached\r\n    #- queries_forwarded\r\n    #- unique_clients\r\n    #- unique_domains\r\n#-----------------------------------------------------------------------------#\r\n- platform: pi_hole\r\n  host: !secret dns_2\r\n  location: !secret pi_hole_location\r\n  monitored_conditions:\r\n    - ads_blocked_today\r\n    - ads_percentage_today\r\n    - dns_queries_today\r\n    #- domains_being_blocked\r\n    #- queries_cached\r\n    #- queries_forwarded\r\n    #- unique_clients\r\n    #- unique_domains\r\n###############################################################################\r\n\r\n    \r\n###############################################################################\r\n# Pi Hole DNS Template to add both sets of data together from both DNS's \r\n###############################################################################\r\n- platform: template\r\n  sensors:\r\n   dns_queries:\r\n     friendly_name: \"DNS Queries\"\r\n     value_template: >-\r\n          {{ ( (states('sensor.pi_hole_dns_queries_today')|float) + (states('sensor.pi_hole_dns_queries_today_2')|float) )|round(0) }}\r\n#-----------------------------------------------------------------------------#\r\n- platform: template\r\n  sensors:\r\n   adverts_blocked:\r\n     friendly_name: \"Adverts Blocked\"\r\n     value_template: >-\r\n          {{ ( (states('sensor.pi_hole_ads_blocked_today')|float) + (states('sensor.pi_hole_ads_blocked_today_2')|float) )|round(0) }}\r\n#-----------------------------------------------------------------------------#\r\n- platform: template\r\n  sensors:\r\n   percent_of_adverts_blocked:\r\n     friendly_name: \"Percent of Adverts Blocked\"\r\n     unit_of_measurement: '%'\r\n     value_template: >-\r\n          {{ ( (states('sensor.pi_hole_ads_percentage_blocked_today')|float) + (states('sensor.pi_hole_ads_percentage_blocked_today_2')|float) )|round(2) }}\r\n###############################################################################\r\n\r\n```\r\n\r\n**Traceback (if applicable):**\r\n```\r\n\r\n```\r\n\r\n**Additional information:**\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/533115328","html_url":"https://github.com/home-assistant/home-assistant/issues/26700#issuecomment-533115328","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/26700","id":533115328,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMzExNTMyOA==","user":{"login":"WhimsySpoon","id":19993138,"node_id":"MDQ6VXNlcjE5OTkzMTM4","avatar_url":"https://avatars3.githubusercontent.com/u/19993138?v=4","gravatar_id":"","url":"https://api.github.com/users/WhimsySpoon","html_url":"https://github.com/WhimsySpoon","followers_url":"https://api.github.com/users/WhimsySpoon/followers","following_url":"https://api.github.com/users/WhimsySpoon/following{/other_user}","gists_url":"https://api.github.com/users/WhimsySpoon/gists{/gist_id}","starred_url":"https://api.github.com/users/WhimsySpoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WhimsySpoon/subscriptions","organizations_url":"https://api.github.com/users/WhimsySpoon/orgs","repos_url":"https://api.github.com/users/WhimsySpoon/repos","events_url":"https://api.github.com/users/WhimsySpoon/events{/privacy}","received_events_url":"https://api.github.com/users/WhimsySpoon/received_events","type":"User","site_admin":false},"created_at":"2019-09-19T12:48:24Z","updated_at":"2019-09-19T12:48:24Z","author_association":"NONE","body":"I'm also running two VMs with Pi-Hole and since the upgrade I've lost the sensors for my second instance. I've attempted various configurations (two `hosts` in the same `pi_hole:` key, for example), but it's not working"}}
{"actor":{"display_login":"WhimsySpoon"}}