Rest fixes (#61296)
This commit is contained in:
parent
af603d0427
commit
17cf53677c
6 changed files with 26 additions and 50 deletions
|
@ -25,7 +25,6 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.template import Template
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
_ENDPOINT = "https://pvoutput.org/service/r2/getstatus.jsp"
|
||||
|
@ -60,10 +59,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||
method = "GET"
|
||||
payload = auth = None
|
||||
verify_ssl = DEFAULT_VERIFY_SSL
|
||||
headers = {
|
||||
"X-Pvoutput-Apikey": Template(api_key, hass),
|
||||
"X-Pvoutput-SystemId": Template(system_id, hass),
|
||||
}
|
||||
headers = {"X-Pvoutput-Apikey": api_key, "X-Pvoutput-SystemId": system_id}
|
||||
|
||||
rest = RestData(hass, method, _ENDPOINT, auth, headers, None, payload, verify_ssl)
|
||||
await rest.async_update()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue