Bump pywemo==0.7.0 (#62360)

This commit is contained in:
Eric Severance 2021-12-19 21:02:05 -08:00 committed by GitHub
parent f2e4613db5
commit e8096e7f51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View File

@ -3,7 +3,7 @@
"name": "Belkin WeMo", "name": "Belkin WeMo",
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/wemo", "documentation": "https://www.home-assistant.io/integrations/wemo",
"requirements": ["pywemo==0.6.7"], "requirements": ["pywemo==0.7.0"],
"ssdp": [ "ssdp": [
{ {
"manufacturer": "Belkin International Inc." "manufacturer": "Belkin International Inc."

View File

@ -2019,7 +2019,7 @@ pyvolumio==0.1.3
pywebpush==1.9.2 pywebpush==1.9.2
# homeassistant.components.wemo # homeassistant.components.wemo
pywemo==0.6.7 pywemo==0.7.0
# homeassistant.components.wilight # homeassistant.components.wilight
pywilight==0.0.70 pywilight==0.0.70

View File

@ -1218,7 +1218,7 @@ pyvolumio==0.1.3
pywebpush==1.9.2 pywebpush==1.9.2
# homeassistant.components.wemo # homeassistant.components.wemo
pywemo==0.6.7 pywemo==0.7.0
# homeassistant.components.wilight # homeassistant.components.wilight
pywilight==0.0.70 pywilight==0.0.70

View File

@ -57,7 +57,7 @@ def pywemo_device_fixture(pywemo_registry, pywemo_model):
device.port = MOCK_PORT device.port = MOCK_PORT
device.name = MOCK_NAME device.name = MOCK_NAME
device.serialnumber = MOCK_SERIAL_NUMBER device.serialnumber = MOCK_SERIAL_NUMBER
device.model_name = pywemo_model device.model_name = pywemo_model.replace("LongPress", "")
device.get_state.return_value = 0 # Default to Off device.get_state.return_value = 0 # Default to Off
device.supports_long_press.return_value = cls.supports_long_press() device.supports_long_press.return_value = cls.supports_long_press()

View File

@ -3,7 +3,6 @@ import pytest
from pywemo.subscribe import EVENT_TYPE_LONG_PRESS from pywemo.subscribe import EVENT_TYPE_LONG_PRESS
from homeassistant.components.automation import DOMAIN as AUTOMATION_DOMAIN from homeassistant.components.automation import DOMAIN as AUTOMATION_DOMAIN
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN
from homeassistant.components.wemo.const import DOMAIN, WEMO_SUBSCRIPTION_EVENT from homeassistant.components.wemo.const import DOMAIN, WEMO_SUBSCRIPTION_EVENT
from homeassistant.const import ( from homeassistant.const import (
CONF_DEVICE_ID, CONF_DEVICE_ID,
@ -11,6 +10,7 @@ from homeassistant.const import (
CONF_ENTITY_ID, CONF_ENTITY_ID,
CONF_PLATFORM, CONF_PLATFORM,
CONF_TYPE, CONF_TYPE,
Platform,
) )
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component
@ -26,8 +26,8 @@ DATA_MESSAGE = {"message": "service-called"}
@pytest.fixture @pytest.fixture
def pywemo_model(): def pywemo_model():
"""Pywemo Dimmer models use the light platform (WemoDimmer class).""" """Pywemo LightSwitch models use the switch platform."""
return "Dimmer" return "LightSwitchLongPress"
async def setup_automation(hass, device_id, trigger_type): async def setup_automation(hass, device_id, trigger_type):
@ -67,14 +67,14 @@ async def test_get_triggers(hass, wemo_entity):
}, },
{ {
CONF_DEVICE_ID: wemo_entity.device_id, CONF_DEVICE_ID: wemo_entity.device_id,
CONF_DOMAIN: LIGHT_DOMAIN, CONF_DOMAIN: Platform.SWITCH,
CONF_ENTITY_ID: wemo_entity.entity_id, CONF_ENTITY_ID: wemo_entity.entity_id,
CONF_PLATFORM: "device", CONF_PLATFORM: "device",
CONF_TYPE: "turned_off", CONF_TYPE: "turned_off",
}, },
{ {
CONF_DEVICE_ID: wemo_entity.device_id, CONF_DEVICE_ID: wemo_entity.device_id,
CONF_DOMAIN: LIGHT_DOMAIN, CONF_DOMAIN: Platform.SWITCH,
CONF_ENTITY_ID: wemo_entity.entity_id, CONF_ENTITY_ID: wemo_entity.entity_id,
CONF_PLATFORM: "device", CONF_PLATFORM: "device",
CONF_TYPE: "turned_on", CONF_TYPE: "turned_on",

View File

@ -26,8 +26,8 @@ asyncio.set_event_loop_policy(runner.HassEventLoopPolicy(True))
@pytest.fixture @pytest.fixture
def pywemo_model(): def pywemo_model():
"""Pywemo Dimmer models use the light platform (WemoDimmer class).""" """Pywemo LightSwitch models use the switch platform."""
return "Dimmer" return "LightSwitchLongPress"
async def test_async_register_device_longpress_fails(hass, pywemo_device): async def test_async_register_device_longpress_fails(hass, pywemo_device):