Upgrade bond-home to 0.0.9 (#37764)

This commit is contained in:
Eugene Prystupa 2020-07-11 21:04:07 -04:00 committed by GitHub
parent f9ce3f3bc4
commit b7318b1914
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View File

@ -1,7 +1,7 @@
"""Support for Bond covers.""" """Support for Bond covers."""
from typing import Any, Callable, List, Optional from typing import Any, Callable, List, Optional
from bond import BOND_DEVICE_TYPE_MOTORIZED_SHADES, Bond from bond import Bond, DeviceTypes
from homeassistant.components.cover import DEVICE_CLASS_SHADE, CoverEntity from homeassistant.components.cover import DEVICE_CLASS_SHADE, CoverEntity
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
@ -26,7 +26,7 @@ async def async_setup_entry(
covers = [ covers = [
BondCover(bond, device) BondCover(bond, device)
for device in devices for device in devices
if device.type == BOND_DEVICE_TYPE_MOTORIZED_SHADES if device.type == DeviceTypes.MOTORIZED_SHADES
] ]
async_add_entities(covers, True) async_add_entities(covers, True)

View File

@ -1,7 +1,7 @@
"""Support for Bond fans.""" """Support for Bond fans."""
from typing import Any, Callable, List, Optional from typing import Any, Callable, List, Optional
from bond import BOND_DEVICE_TYPE_CEILING_FAN, Bond from bond import Bond, DeviceTypes
from homeassistant.components.fan import ( from homeassistant.components.fan import (
SPEED_HIGH, SPEED_HIGH,
@ -33,7 +33,7 @@ async def async_setup_entry(
fans = [ fans = [
BondFan(bond, device) BondFan(bond, device)
for device in devices for device in devices
if device.type == BOND_DEVICE_TYPE_CEILING_FAN if device.type == DeviceTypes.CEILING_FAN
] ]
async_add_entities(fans, True) async_add_entities(fans, True)

View File

@ -4,7 +4,7 @@
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/bond", "documentation": "https://www.home-assistant.io/integrations/bond",
"requirements": [ "requirements": [
"bond-home==0.0.8" "bond-home==0.0.9"
], ],
"codeowners": [ "codeowners": [
"@prystupa" "@prystupa"

View File

@ -353,7 +353,7 @@ blockchain==1.4.4
bomradarloop==0.1.4 bomradarloop==0.1.4
# homeassistant.components.bond # homeassistant.components.bond
bond-home==0.0.8 bond-home==0.0.9
# homeassistant.components.amazon_polly # homeassistant.components.amazon_polly
# homeassistant.components.route53 # homeassistant.components.route53

View File

@ -178,7 +178,7 @@ blinkpy==0.15.1
bomradarloop==0.1.4 bomradarloop==0.1.4
# homeassistant.components.bond # homeassistant.components.bond
bond-home==0.0.8 bond-home==0.0.9
# homeassistant.components.braviatv # homeassistant.components.braviatv
bravia-tv==1.0.6 bravia-tv==1.0.6

View File

@ -2,7 +2,7 @@
from datetime import timedelta from datetime import timedelta
import logging import logging
from bond import BOND_DEVICE_TYPE_MOTORIZED_SHADES from bond import DeviceTypes
from homeassistant import core from homeassistant import core
from homeassistant.components.cover import DOMAIN as COVER_DOMAIN from homeassistant.components.cover import DOMAIN as COVER_DOMAIN
@ -25,7 +25,7 @@ _LOGGER = logging.getLogger(__name__)
def shades(name: str): def shades(name: str):
"""Create motorized shades with given name.""" """Create motorized shades with given name."""
return {"name": name, "type": BOND_DEVICE_TYPE_MOTORIZED_SHADES} return {"name": name, "type": DeviceTypes.MOTORIZED_SHADES}
async def test_entity_registry(hass: core.HomeAssistant): async def test_entity_registry(hass: core.HomeAssistant):

View File

@ -1,7 +1,7 @@
"""Tests for the Bond fan device.""" """Tests for the Bond fan device."""
from datetime import timedelta from datetime import timedelta
from bond import BOND_DEVICE_TYPE_CEILING_FAN from bond import DeviceTypes
from homeassistant import core from homeassistant import core
from homeassistant.components import fan from homeassistant.components import fan
@ -20,7 +20,7 @@ def ceiling_fan(name: str):
"""Create a ceiling fan with given name.""" """Create a ceiling fan with given name."""
return { return {
"name": name, "name": name,
"type": BOND_DEVICE_TYPE_CEILING_FAN, "type": DeviceTypes.CEILING_FAN,
"actions": ["SetSpeed"], "actions": ["SetSpeed"],
} }