Upgrade construct to 2.9.45 (#16362)
This commit is contained in:
1 parent
93e3596e5a
commit
8d9da4e7b9
10 files changed
+45
-46
No files matched your search
@@ -11,14 +11,14 @@ import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
CONF_NAME, TEMP_CELSIUS, STATE_UNKNOWN, EVENT_HOMEASSISTANT_STOP,
|
||||
EVENT_HOMEASSISTANT_START)
|
||||
CONF_NAME, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP,
|
||||
STATE_UNKNOWN, TEMP_CELSIUS)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
REQUIREMENTS = ['beacontools[scan]==1.2.3', 'construct==2.9.41']
|
||||
REQUIREMENTS = ['beacontools[scan]==1.2.3', 'construct==2.9.45']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -43,12 +43,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Validate configuration, create devices and start monitoring thread."""
|
||||
bt_device_id = config.get("bt_device_id")
|
||||
|
||||
beacons = config.get("beacons")
|
||||
beacons = config.get(CONF_BEACONS)
|
||||
devices = []
|
||||
|
||||
for dev_name, properties in beacons.items():
|
||||
namespace = get_from_conf(properties, "namespace", 20)
|
||||
instance = get_from_conf(properties, "instance", 12)
|
||||
namespace = get_from_conf(properties, CONF_NAMESPACE, 20)
|
||||
instance = get_from_conf(properties, CONF_INSTANCE, 12)
|
||||
name = properties.get(CONF_NAME, dev_name)
|
||||
|
||||
if instance is None or namespace is None:
|
||||
|
||||
@@ -8,11 +8,13 @@ import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_TOKEN
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_TOKEN)
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
|
||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -25,8 +27,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
||||
})
|
||||
|
||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
||||
|
||||
ATTR_POWER = 'power'
|
||||
ATTR_CHARGING = 'charging'
|
||||
ATTR_BATTERY_LEVEL = 'battery_level'
|
||||
|
||||
Reference in new issue
Block a user