Upgrade construct to 2.9.45 (#16362)
parent
93e3596e5a
commit
8d9da4e7b9
|
@ -15,7 +15,7 @@ from homeassistant.const import (
|
||||||
CONF_MAC, CONF_DEVICES, TEMP_CELSIUS, ATTR_TEMPERATURE, PRECISION_HALVES)
|
CONF_MAC, CONF_DEVICES, TEMP_CELSIUS, ATTR_TEMPERATURE, PRECISION_HALVES)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
REQUIREMENTS = ['python-eq3bt==0.1.9', 'construct==2.9.41']
|
REQUIREMENTS = ['python-eq3bt==0.1.9', 'construct==2.9.45']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,12 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
|
from homeassistant.components.device_tracker import (
|
||||||
|
DOMAIN, PLATFORM_SCHEMA, DeviceScanner)
|
||||||
|
from homeassistant.const import CONF_HOST, CONF_TOKEN
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.components.device_tracker import (DOMAIN, PLATFORM_SCHEMA,
|
|
||||||
DeviceScanner)
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||||
from homeassistant.const import (CONF_HOST, CONF_TOKEN)
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -20,8 +22,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Required(CONF_TOKEN): vol.All(cv.string, vol.Length(min=32, max=32)),
|
vol.Required(CONF_TOKEN): vol.All(cv.string, vol.Length(min=32, max=32)),
|
||||||
})
|
})
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
|
||||||
|
|
||||||
|
|
||||||
def get_scanner(hass, config):
|
def get_scanner(hass, config):
|
||||||
"""Return a Xiaomi MiIO device scanner."""
|
"""Return a Xiaomi MiIO device scanner."""
|
||||||
|
@ -56,7 +56,7 @@ class XiaomiMiioDeviceScanner(DeviceScanner):
|
||||||
self.device = device
|
self.device = device
|
||||||
|
|
||||||
async def async_scan_devices(self):
|
async def async_scan_devices(self):
|
||||||
"""Scan for devices and return a list containing found device ids."""
|
"""Scan for devices and return a list containing found device IDs."""
|
||||||
from miio import DeviceException
|
from miio import DeviceException
|
||||||
|
|
||||||
devices = []
|
devices = []
|
||||||
|
@ -68,7 +68,7 @@ class XiaomiMiioDeviceScanner(DeviceScanner):
|
||||||
devices.append(device['mac'])
|
devices.append(device['mac'])
|
||||||
|
|
||||||
except DeviceException as ex:
|
except DeviceException as ex:
|
||||||
_LOGGER.error("Got exception while fetching the state: %s", ex)
|
_LOGGER.error("Unable to fetch the state: %s", ex)
|
||||||
|
|
||||||
return devices
|
return devices
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,15 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.fan import (FanEntity, PLATFORM_SCHEMA,
|
from homeassistant.components.fan import (
|
||||||
SUPPORT_SET_SPEED, DOMAIN, )
|
DOMAIN, PLATFORM_SCHEMA, SUPPORT_SET_SPEED, FanEntity)
|
||||||
from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_TOKEN,
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID, )
|
ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_TOKEN)
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
DEFAULT_NAME = 'Xiaomi Miio Device'
|
DEFAULT_NAME = 'Xiaomi Miio Device'
|
||||||
|
@ -49,8 +51,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
'zhimi.humidifier.ca1']),
|
'zhimi.humidifier.ca1']),
|
||||||
})
|
})
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
|
||||||
|
|
||||||
ATTR_MODEL = 'model'
|
ATTR_MODEL = 'model'
|
||||||
|
|
||||||
# Air Purifier
|
# Air Purifier
|
||||||
|
|
|
@ -5,23 +5,24 @@ For more details about this platform, please refer to the documentation
|
||||||
https://home-assistant.io/components/light.xiaomi_miio/
|
https://home-assistant.io/components/light.xiaomi_miio/
|
||||||
"""
|
"""
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
from math import ceil
|
from math import ceil
|
||||||
from datetime import timedelta
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
PLATFORM_SCHEMA, ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS,
|
ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_ENTITY_ID, DOMAIN, PLATFORM_SCHEMA,
|
||||||
ATTR_COLOR_TEMP, SUPPORT_COLOR_TEMP, Light, ATTR_ENTITY_ID, DOMAIN, )
|
SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, Light)
|
||||||
|
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_TOKEN
|
||||||
from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_TOKEN, )
|
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.util import dt
|
from homeassistant.util import dt
|
||||||
|
|
||||||
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
DEFAULT_NAME = 'Xiaomi Philips Light'
|
DEFAULT_NAME = 'Xiaomi Philips Light'
|
||||||
|
@ -43,8 +44,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
'philips.light.mono1']),
|
'philips.light.mono1']),
|
||||||
})
|
})
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
|
||||||
|
|
||||||
# The light does not accept cct values < 1
|
# The light does not accept cct values < 1
|
||||||
CCT_MIN = 1
|
CCT_MIN = 1
|
||||||
CCT_MAX = 100
|
CCT_MAX = 100
|
||||||
|
|
|
@ -22,7 +22,7 @@ from homeassistant.exceptions import PlatformNotReady
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.util.dt import utcnow
|
from homeassistant.util.dt import utcnow
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,14 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
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.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME, TEMP_CELSIUS, STATE_UNKNOWN, EVENT_HOMEASSISTANT_STOP,
|
CONF_NAME, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP,
|
||||||
EVENT_HOMEASSISTANT_START)
|
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__)
|
_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."""
|
"""Validate configuration, create devices and start monitoring thread."""
|
||||||
bt_device_id = config.get("bt_device_id")
|
bt_device_id = config.get("bt_device_id")
|
||||||
|
|
||||||
beacons = config.get("beacons")
|
beacons = config.get(CONF_BEACONS)
|
||||||
devices = []
|
devices = []
|
||||||
|
|
||||||
for dev_name, properties in beacons.items():
|
for dev_name, properties in beacons.items():
|
||||||
namespace = get_from_conf(properties, "namespace", 20)
|
namespace = get_from_conf(properties, CONF_NAMESPACE, 20)
|
||||||
instance = get_from_conf(properties, "instance", 12)
|
instance = get_from_conf(properties, CONF_INSTANCE, 12)
|
||||||
name = properties.get(CONF_NAME, dev_name)
|
name = properties.get(CONF_NAME, dev_name)
|
||||||
|
|
||||||
if instance is None or namespace is None:
|
if instance is None or namespace is None:
|
||||||
|
|
|
@ -8,11 +8,13 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
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
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
|
||||||
from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_TOKEN)
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -25,8 +27,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
|
||||||
})
|
})
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
|
||||||
|
|
||||||
ATTR_POWER = 'power'
|
ATTR_POWER = 'power'
|
||||||
ATTR_CHARGING = 'charging'
|
ATTR_CHARGING = 'charging'
|
||||||
ATTR_BATTERY_LEVEL = 'battery_level'
|
ATTR_BATTERY_LEVEL = 'battery_level'
|
||||||
|
|
|
@ -10,12 +10,14 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
from homeassistant.components.switch import (
|
||||||
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA,
|
DOMAIN, PLATFORM_SCHEMA, SwitchDevice)
|
||||||
DOMAIN, )
|
from homeassistant.const import (
|
||||||
from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_TOKEN,
|
ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_TOKEN)
|
||||||
ATTR_ENTITY_ID, )
|
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -39,8 +41,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
'chuangmi.plug.v3']),
|
'chuangmi.plug.v3']),
|
||||||
})
|
})
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
|
||||||
|
|
||||||
ATTR_POWER = 'power'
|
ATTR_POWER = 'power'
|
||||||
ATTR_TEMPERATURE = 'temperature'
|
ATTR_TEMPERATURE = 'temperature'
|
||||||
ATTR_LOAD_POWER = 'load_power'
|
ATTR_LOAD_POWER = 'load_power'
|
||||||
|
|
|
@ -21,7 +21,7 @@ from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_TOKEN, STATE_OFF, STATE_ON)
|
ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_TOKEN, STATE_OFF, STATE_ON)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.45']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ concord232==0.15
|
||||||
# homeassistant.components.sensor.xiaomi_miio
|
# homeassistant.components.sensor.xiaomi_miio
|
||||||
# homeassistant.components.switch.xiaomi_miio
|
# homeassistant.components.switch.xiaomi_miio
|
||||||
# homeassistant.components.vacuum.xiaomi_miio
|
# homeassistant.components.vacuum.xiaomi_miio
|
||||||
construct==2.9.41
|
construct==2.9.45
|
||||||
|
|
||||||
# homeassistant.scripts.credstash
|
# homeassistant.scripts.credstash
|
||||||
# credstash==1.14.0
|
# credstash==1.14.0
|
||||||
|
|
Loading…
Reference in New Issue