mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Update pysmartthings to 0.5.0 (#20759)
This commit is contained in:
parent
e0d534c3fb
commit
f84317e325
@ -23,7 +23,7 @@ from .const import (
|
|||||||
from .smartapp import (
|
from .smartapp import (
|
||||||
setup_smartapp, setup_smartapp_endpoint, validate_installed_app)
|
setup_smartapp, setup_smartapp_endpoint, validate_installed_app)
|
||||||
|
|
||||||
REQUIREMENTS = ['pysmartapp==0.3.0', 'pysmartthings==0.4.2']
|
REQUIREMENTS = ['pysmartapp==0.3.0', 'pysmartthings==0.5.0']
|
||||||
DEPENDENCIES = ['webhook']
|
DEPENDENCIES = ['webhook']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -139,6 +139,7 @@ class DeviceBroker:
|
|||||||
async def event_handler(self, req, resp, app):
|
async def event_handler(self, req, resp, app):
|
||||||
"""Broker for incoming events."""
|
"""Broker for incoming events."""
|
||||||
from pysmartapp.event import EVENT_TYPE_DEVICE
|
from pysmartapp.event import EVENT_TYPE_DEVICE
|
||||||
|
from pysmartthings import Capability, Attribute
|
||||||
|
|
||||||
# Do not process events received from a different installed app
|
# Do not process events received from a different installed app
|
||||||
# under the same parent SmartApp (valid use-scenario)
|
# under the same parent SmartApp (valid use-scenario)
|
||||||
@ -156,7 +157,8 @@ class DeviceBroker:
|
|||||||
evt.component_id, evt.capability, evt.attribute, evt.value)
|
evt.component_id, evt.capability, evt.attribute, evt.value)
|
||||||
|
|
||||||
# Fire events for buttons
|
# Fire events for buttons
|
||||||
if evt.capability == 'button' and evt.attribute == 'button':
|
if evt.capability == Capability.button and \
|
||||||
|
evt.attribute == Attribute.button:
|
||||||
data = {
|
data = {
|
||||||
'component_id': evt.component_id,
|
'component_id': evt.component_id,
|
||||||
'device_id': evt.device_id,
|
'device_id': evt.device_id,
|
||||||
|
@ -1228,7 +1228,7 @@ pysma==0.3.1
|
|||||||
pysmartapp==0.3.0
|
pysmartapp==0.3.0
|
||||||
|
|
||||||
# homeassistant.components.smartthings
|
# homeassistant.components.smartthings
|
||||||
pysmartthings==0.4.2
|
pysmartthings==0.5.0
|
||||||
|
|
||||||
# homeassistant.components.device_tracker.snmp
|
# homeassistant.components.device_tracker.snmp
|
||||||
# homeassistant.components.sensor.snmp
|
# homeassistant.components.sensor.snmp
|
||||||
|
@ -217,7 +217,7 @@ pyqwikswitch==0.8
|
|||||||
pysmartapp==0.3.0
|
pysmartapp==0.3.0
|
||||||
|
|
||||||
# homeassistant.components.smartthings
|
# homeassistant.components.smartthings
|
||||||
pysmartthings==0.4.2
|
pysmartthings==0.5.0
|
||||||
|
|
||||||
# homeassistant.components.sonos
|
# homeassistant.components.sonos
|
||||||
pysonos==0.0.6
|
pysonos==0.0.6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user