mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix Insteon Leak Sensor (#13515)
* update leak sensor * Fix error when insteon state type is unknown * Bump insteon version to 0.8.3 * Update requirements all and test * Fix requirements conflicts due to lack of commit sync * Requirements sync * Rerun script/gen_requirements_all.py * Try requirements update again * Update requirements
This commit is contained in:
parent
3fdb0002a7
commit
f391cbae27
@ -17,7 +17,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
SENSOR_TYPES = {'openClosedSensor': 'opening',
|
||||
'motionSensor': 'motion',
|
||||
'doorSensor': 'door',
|
||||
'leakSensor': 'moisture'}
|
||||
'wetLeakSensor': 'moisture'}
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
@ -28,7 +28,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||
address = discovery_info['address']
|
||||
device = plm.devices[address]
|
||||
state_key = discovery_info['state_key']
|
||||
|
||||
name = device.states[state_key].name
|
||||
if name != 'dryLeakSensor':
|
||||
_LOGGER.debug('Adding device %s entity %s to Binary Sensor platform',
|
||||
device.address.hex, device.states[state_key].name)
|
||||
|
||||
@ -53,5 +54,4 @@ class InsteonPLMBinarySensor(InsteonPLMEntity, BinarySensorDevice):
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return the boolean response if the node is on."""
|
||||
sensorstate = self._insteon_device_state.value
|
||||
return bool(sensorstate)
|
||||
return bool(self._insteon_device_state.value)
|
||||
|
@ -16,7 +16,7 @@ import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers import discovery
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
REQUIREMENTS = ['insteonplm==0.8.2']
|
||||
REQUIREMENTS = ['insteonplm==0.8.3']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@ -64,8 +64,9 @@ def async_setup(hass, config):
|
||||
"""Detect device from transport to be delegated to platform."""
|
||||
for state_key in device.states:
|
||||
platform_info = ipdb[device.states[state_key]]
|
||||
if platform_info:
|
||||
platform = platform_info.platform
|
||||
if platform is not None:
|
||||
if platform:
|
||||
_LOGGER.info("New INSTEON PLM device: %s (%s) %s",
|
||||
device.address,
|
||||
device.states[state_key].name,
|
||||
@ -127,13 +128,15 @@ class IPDB(object):
|
||||
from insteonplm.states.sensor import (VariableSensor,
|
||||
OnOffSensor,
|
||||
SmokeCO2Sensor,
|
||||
IoLincSensor)
|
||||
IoLincSensor,
|
||||
LeakSensorDryWet)
|
||||
|
||||
self.states = [State(OnOffSwitch_OutletTop, 'switch'),
|
||||
State(OnOffSwitch_OutletBottom, 'switch'),
|
||||
State(OpenClosedRelay, 'switch'),
|
||||
State(OnOffSwitch, 'switch'),
|
||||
|
||||
State(LeakSensorDryWet, 'binary_sensor'),
|
||||
State(IoLincSensor, 'binary_sensor'),
|
||||
State(SmokeCO2Sensor, 'sensor'),
|
||||
State(OnOffSensor, 'binary_sensor'),
|
||||
|
@ -417,7 +417,7 @@ influxdb==5.0.0
|
||||
insteonlocal==0.53
|
||||
|
||||
# homeassistant.components.insteon_plm
|
||||
insteonplm==0.8.2
|
||||
insteonplm==0.8.3
|
||||
|
||||
# homeassistant.components.verisure
|
||||
jsonpath==0.75
|
||||
|
Loading…
x
Reference in New Issue
Block a user