Lint
This commit is contained in:
parent
ec852f05ad
commit
b102e4eaad
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ import fnmatch
|
|||
from string import Template
|
||||
from http.server import BaseHTTPRequestHandler
|
||||
import urllib.request
|
||||
from urllib.parse import urlparse, parse_qs, unquote, urlencode
|
||||
from urllib.parse import urlparse, parse_qs, unquote
|
||||
|
||||
|
||||
### Some options for you to change
|
||||
|
@ -3861,17 +3861,17 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
headers["x-ha-access"] = HASS_API_PASSWORD
|
||||
|
||||
req = urllib.request.Request("%sservices" % HASS_API,
|
||||
headers=headers, method='GET')
|
||||
headers=headers, method='GET')
|
||||
with urllib.request.urlopen(req) as response:
|
||||
services = response.read().decode('utf-8')
|
||||
|
||||
req = urllib.request.Request("%sevents" % HASS_API,
|
||||
headers=headers, method='GET')
|
||||
headers=headers, method='GET')
|
||||
with urllib.request.urlopen(req) as response:
|
||||
events = response.read().decode('utf-8')
|
||||
|
||||
req = urllib.request.Request("%sstates" % HASS_API,
|
||||
headers=headers, method='GET')
|
||||
headers=headers, method='GET')
|
||||
with urllib.request.urlopen(req) as response:
|
||||
states = response.read().decode('utf-8')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue