Upgrade construct to 2.9.45 (#16362)

This commit is contained in:
Fabian Affolter authored and GitHub committed 2018-10-10 23:52:45 +02:00
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: