mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix Skybell useragent (#38245)
This commit is contained in:
parent
56186a3d75
commit
8fec0da5be
@ -5,7 +5,12 @@ from requests.exceptions import ConnectTimeout, HTTPError
|
|||||||
from skybellpy import Skybell
|
from skybellpy import Skybell
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import (
|
||||||
|
ATTR_ATTRIBUTION,
|
||||||
|
CONF_PASSWORD,
|
||||||
|
CONF_USERNAME,
|
||||||
|
__version__,
|
||||||
|
)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
@ -20,6 +25,8 @@ DOMAIN = "skybell"
|
|||||||
DEFAULT_CACHEDB = "./skybell_cache.pickle"
|
DEFAULT_CACHEDB = "./skybell_cache.pickle"
|
||||||
DEFAULT_ENTITY_NAMESPACE = "skybell"
|
DEFAULT_ENTITY_NAMESPACE = "skybell"
|
||||||
|
|
||||||
|
AGENT_IDENTIFIER = f"HomeAssistant/{__version__}"
|
||||||
|
|
||||||
CONFIG_SCHEMA = vol.Schema(
|
CONFIG_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
DOMAIN: vol.Schema(
|
DOMAIN: vol.Schema(
|
||||||
@ -42,7 +49,11 @@ def setup(hass, config):
|
|||||||
try:
|
try:
|
||||||
cache = hass.config.path(DEFAULT_CACHEDB)
|
cache = hass.config.path(DEFAULT_CACHEDB)
|
||||||
skybell = Skybell(
|
skybell = Skybell(
|
||||||
username=username, password=password, get_devices=True, cache_path=cache
|
username=username,
|
||||||
|
password=password,
|
||||||
|
get_devices=True,
|
||||||
|
cache_path=cache,
|
||||||
|
agent_identifier=AGENT_IDENTIFIER,
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.data[DOMAIN] = skybell
|
hass.data[DOMAIN] = skybell
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"domain": "skybell",
|
"domain": "skybell",
|
||||||
"name": "SkyBell",
|
"name": "SkyBell",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/skybell",
|
"documentation": "https://www.home-assistant.io/integrations/skybell",
|
||||||
"requirements": ["skybellpy==0.4.0"],
|
"requirements": ["skybellpy==0.6.1"],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
@ -1963,7 +1963,7 @@ simplisafe-python==9.2.1
|
|||||||
sisyphus-control==2.2.1
|
sisyphus-control==2.2.1
|
||||||
|
|
||||||
# homeassistant.components.skybell
|
# homeassistant.components.skybell
|
||||||
skybellpy==0.4.0
|
skybellpy==0.6.1
|
||||||
|
|
||||||
# homeassistant.components.slack
|
# homeassistant.components.slack
|
||||||
slackclient==2.5.0
|
slackclient==2.5.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user