Broadlink (#13585)
* Update broadlink lib * Update broadlink lib * requirements
This commit is contained in:
parent
343d1384a3
commit
45ef34ff81
3 changed files with 11 additions and 15 deletions
|
@ -19,9 +19,7 @@ from homeassistant.helpers.entity import Entity
|
|||
from homeassistant.util import Throttle
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
REQUIREMENTS = [
|
||||
'https://github.com/balloob/python-broadlink/archive/'
|
||||
'3580ff2eaccd267846f14246d6ede6e30671f7c6.zip#broadlink==0.5.1']
|
||||
REQUIREMENTS = ['broadlink==0.8.0']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -108,7 +106,7 @@ class BroadlinkData(object):
|
|||
"""Initialize the data object."""
|
||||
import broadlink
|
||||
self.data = None
|
||||
self._device = broadlink.a1((ip_addr, 80), mac_addr)
|
||||
self._device = broadlink.a1((ip_addr, 80), mac_addr, None)
|
||||
self._device.timeout = timeout
|
||||
self._schema = vol.Schema({
|
||||
vol.Optional('temperature'): vol.Range(min=-50, max=150),
|
||||
|
|
|
@ -22,9 +22,7 @@ import homeassistant.helpers.config_validation as cv
|
|||
from homeassistant.util import Throttle
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
||||
REQUIREMENTS = [
|
||||
'https://github.com/balloob/python-broadlink/archive/'
|
||||
'3580ff2eaccd267846f14246d6ede6e30671f7c6.zip#broadlink==0.5.1']
|
||||
REQUIREMENTS = ['broadlink==0.8.0']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -142,7 +140,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
return slots['slot_{}'.format(slot)]
|
||||
|
||||
if switch_type in RM_TYPES:
|
||||
broadlink_device = broadlink.rm((ip_addr, 80), mac_addr)
|
||||
broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
|
||||
hass.services.register(DOMAIN, SERVICE_LEARN + '_' +
|
||||
ip_addr.replace('.', '_'), _learn_command)
|
||||
hass.services.register(DOMAIN, SERVICE_SEND + '_' +
|
||||
|
@ -159,14 +157,14 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
)
|
||||
)
|
||||
elif switch_type in SP1_TYPES:
|
||||
broadlink_device = broadlink.sp1((ip_addr, 80), mac_addr)
|
||||
broadlink_device = broadlink.sp1((ip_addr, 80), mac_addr, None)
|
||||
switches = [BroadlinkSP1Switch(friendly_name, broadlink_device)]
|
||||
elif switch_type in SP2_TYPES:
|
||||
broadlink_device = broadlink.sp2((ip_addr, 80), mac_addr)
|
||||
broadlink_device = broadlink.sp2((ip_addr, 80), mac_addr, None)
|
||||
switches = [BroadlinkSP2Switch(friendly_name, broadlink_device)]
|
||||
elif switch_type in MP1_TYPES:
|
||||
switches = []
|
||||
broadlink_device = broadlink.mp1((ip_addr, 80), mac_addr)
|
||||
broadlink_device = broadlink.mp1((ip_addr, 80), mac_addr, None)
|
||||
parent_device = BroadlinkMP1Switch(broadlink_device)
|
||||
for i in range(1, 5):
|
||||
slot = BroadlinkMP1Slot(
|
||||
|
|
|
@ -172,6 +172,10 @@ boto3==1.4.7
|
|||
# homeassistant.scripts.credstash
|
||||
botocore==1.7.34
|
||||
|
||||
# homeassistant.components.sensor.broadlink
|
||||
# homeassistant.components.switch.broadlink
|
||||
broadlink==0.8.0
|
||||
|
||||
# homeassistant.components.device_tracker.bluetooth_tracker
|
||||
bt_proximity==0.1.2
|
||||
|
||||
|
@ -392,10 +396,6 @@ httplib2==0.10.3
|
|||
# homeassistant.components.media_player.braviatv
|
||||
https://github.com/aparraga/braviarc/archive/0.3.7.zip#braviarc==0.3.7
|
||||
|
||||
# homeassistant.components.sensor.broadlink
|
||||
# homeassistant.components.switch.broadlink
|
||||
https://github.com/balloob/python-broadlink/archive/3580ff2eaccd267846f14246d6ede6e30671f7c6.zip#broadlink==0.5.1
|
||||
|
||||
# homeassistant.components.media_player.spotify
|
||||
https://github.com/happyleavesaoc/spotipy/archive/544614f4b1d508201d363e84e871f86c90aa26b2.zip#spotipy==2.4.4
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue