mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Wink water leak sensor (#2572)
This commit is contained in:
parent
aed9ab0271
commit
53f9809567
@ -13,14 +13,15 @@ from homeassistant.const import CONF_ACCESS_TOKEN
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.loader import get_component
|
from homeassistant.loader import get_component
|
||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
# These are the available sensors mapped to binary_sensor class
|
# These are the available sensors mapped to binary_sensor class
|
||||||
SENSOR_TYPES = {
|
SENSOR_TYPES = {
|
||||||
"opened": "opening",
|
"opened": "opening",
|
||||||
"brightness": "light",
|
"brightness": "light",
|
||||||
"vibration": "vibration",
|
"vibration": "vibration",
|
||||||
"loudness": "sound"
|
"loudness": "sound",
|
||||||
|
"liquid_detected": "moisture"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -74,6 +75,8 @@ class WinkBinarySensorDevice(WinkDevice, BinarySensorDevice, Entity):
|
|||||||
return self.wink.vibration_boolean()
|
return self.wink.vibration_boolean()
|
||||||
elif self.capability == "brightness":
|
elif self.capability == "brightness":
|
||||||
return self.wink.brightness_boolean()
|
return self.wink.brightness_boolean()
|
||||||
|
elif self.capability == "liquid_detected":
|
||||||
|
return self.wink.liquid_boolean()
|
||||||
else:
|
else:
|
||||||
return self.wink.state()
|
return self.wink.state()
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from homeassistant.components.garage_door import GarageDoorDevice
|
|||||||
from homeassistant.components.wink import WinkDevice
|
from homeassistant.components.wink import WinkDevice
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
|
@ -14,7 +14,7 @@ from homeassistant.util import color as color_util
|
|||||||
from homeassistant.util.color import \
|
from homeassistant.util.color import \
|
||||||
color_temperature_mired_to_kelvin as mired_to_kelvin
|
color_temperature_mired_to_kelvin as mired_to_kelvin
|
||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||||
|
@ -10,7 +10,7 @@ from homeassistant.components.lock import LockDevice
|
|||||||
from homeassistant.components.wink import WinkDevice
|
from homeassistant.components.wink import WinkDevice
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
|
@ -10,7 +10,7 @@ from homeassistant.components.rollershutter import RollershutterDevice
|
|||||||
from homeassistant.components.wink import WinkDevice
|
from homeassistant.components.wink import WinkDevice
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
|
@ -12,7 +12,7 @@ from homeassistant.helpers.entity import Entity
|
|||||||
from homeassistant.components.wink import WinkDevice
|
from homeassistant.components.wink import WinkDevice
|
||||||
from homeassistant.loader import get_component
|
from homeassistant.loader import get_component
|
||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
SENSOR_TYPES = ['temperature', 'humidity']
|
SENSOR_TYPES = ['temperature', 'humidity']
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from homeassistant.components.wink import WinkDevice
|
|||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
from homeassistant.helpers.entity import ToggleEntity
|
from homeassistant.helpers.entity import ToggleEntity
|
||||||
|
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
|
@ -12,7 +12,7 @@ from homeassistant.const import CONF_ACCESS_TOKEN, ATTR_BATTERY_LEVEL
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
DOMAIN = "wink"
|
DOMAIN = "wink"
|
||||||
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
|
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
|
||||||
|
|
||||||
SUBSCRIPTION_HANDLER = None
|
SUBSCRIPTION_HANDLER = None
|
||||||
CHANNELS = []
|
CHANNELS = []
|
||||||
|
@ -347,7 +347,7 @@ python-twitch==1.3.0
|
|||||||
# homeassistant.components.rollershutter.wink
|
# homeassistant.components.rollershutter.wink
|
||||||
# homeassistant.components.sensor.wink
|
# homeassistant.components.sensor.wink
|
||||||
# homeassistant.components.switch.wink
|
# homeassistant.components.switch.wink
|
||||||
python-wink==0.7.10
|
python-wink==0.7.11
|
||||||
|
|
||||||
# homeassistant.components.keyboard
|
# homeassistant.components.keyboard
|
||||||
pyuserinput==0.1.9
|
pyuserinput==0.1.9
|
||||||
|
Loading…
x
Reference in New Issue
Block a user