parent
c37883c9a9
commit
7596ac23fc
3 changed files with 14 additions and 7 deletions
|
@ -78,7 +78,7 @@ class TemperatureSensor(Sensor):
|
|||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit of measurement of this entityy."""
|
||||
"""Return the unit of measurement of this entity."""
|
||||
return self.hass.config.units.temperature_unit
|
||||
|
||||
@property
|
||||
|
|
|
@ -14,13 +14,14 @@ from homeassistant import const as ha_const
|
|||
from homeassistant.helpers import discovery, entity
|
||||
from homeassistant.util import slugify
|
||||
|
||||
REQUIREMENTS = ['bellows==0.3.4']
|
||||
REQUIREMENTS = ['bellows==0.4.0']
|
||||
|
||||
DOMAIN = 'zha'
|
||||
|
||||
CONF_USB_PATH = 'usb_path'
|
||||
CONF_BAUDRATE = 'baudrate'
|
||||
CONF_DATABASE = 'database_path'
|
||||
CONF_DEVICE_CONFIG = 'device_config'
|
||||
CONF_USB_PATH = 'usb_path'
|
||||
DATA_DEVICE_CONFIG = 'zha_device_config'
|
||||
|
||||
DEVICE_CONFIG_SCHEMA_ENTRY = vol.Schema({
|
||||
|
@ -30,6 +31,7 @@ DEVICE_CONFIG_SCHEMA_ENTRY = vol.Schema({
|
|||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
CONF_USB_PATH: cv.string,
|
||||
vol.Optional(CONF_BAUDRATE, default=57600): cv.positive_int,
|
||||
CONF_DATABASE: cv.string,
|
||||
vol.Optional(CONF_DEVICE_CONFIG, default={}):
|
||||
vol.Schema({cv.string: DEVICE_CONFIG_SCHEMA_ENTRY}),
|
||||
|
@ -41,9 +43,9 @@ ATTR_DURATION = 'duration'
|
|||
SERVICE_PERMIT = 'permit'
|
||||
SERVICE_DESCRIPTIONS = {
|
||||
SERVICE_PERMIT: {
|
||||
"description": "Allow nodes to join the Zigbee network",
|
||||
"description": "Allow nodes to join the ZigBee network",
|
||||
"fields": {
|
||||
"duration": {
|
||||
ATTR_DURATION: {
|
||||
"description": "Time to permit joins, in seconds",
|
||||
"example": "60",
|
||||
},
|
||||
|
@ -81,7 +83,8 @@ def async_setup(hass, config):
|
|||
|
||||
ezsp_ = bellows.ezsp.EZSP()
|
||||
usb_path = config[DOMAIN].get(CONF_USB_PATH)
|
||||
yield from ezsp_.connect(usb_path)
|
||||
baudrate = config[DOMAIN].get(CONF_BAUDRATE)
|
||||
yield from ezsp_.connect(usb_path, baudrate)
|
||||
|
||||
database = config[DOMAIN].get(CONF_DATABASE)
|
||||
APPLICATION_CONTROLLER = ControllerApplication(ezsp_, database)
|
||||
|
@ -132,6 +135,10 @@ class ApplicationListener:
|
|||
"""Handle device leaving the network."""
|
||||
pass
|
||||
|
||||
def device_removed(self, device):
|
||||
"""Handle device being removed from the network."""
|
||||
pass
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_device_initialized(self, device, join):
|
||||
"""Handle device joined and basic information discovered (async)."""
|
||||
|
|
|
@ -111,7 +111,7 @@ batinfo==0.4.2
|
|||
beautifulsoup4==4.6.0
|
||||
|
||||
# homeassistant.components.zha
|
||||
bellows==0.3.4
|
||||
bellows==0.4.0
|
||||
|
||||
# homeassistant.components.blink
|
||||
blinkpy==0.6.0
|
||||
|
|
Loading…
Add table
Reference in a new issue