mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Updated to version 3.1.2 and fixed invalid host setup error (#2431)
This commit is contained in:
parent
3447fdc76f
commit
ef74bd9892
@ -15,8 +15,8 @@ from homeassistant.const import (
|
|||||||
CONF_HOST, STATE_IDLE, STATE_PLAYING, STATE_UNKNOWN, STATE_HOME)
|
CONF_HOST, STATE_IDLE, STATE_PLAYING, STATE_UNKNOWN, STATE_HOME)
|
||||||
|
|
||||||
REQUIREMENTS = [
|
REQUIREMENTS = [
|
||||||
'https://github.com/bah2830/python-roku/archive/3.1.1.zip'
|
'https://github.com/bah2830/python-roku/archive/3.1.2.zip'
|
||||||
'#python-roku==3.1.1']
|
'#roku==3.1.2']
|
||||||
|
|
||||||
KNOWN_HOSTS = []
|
KNOWN_HOSTS = []
|
||||||
DEFAULT_PORT = 8060
|
DEFAULT_PORT = 8060
|
||||||
@ -45,6 +45,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
|
|
||||||
rokus = []
|
rokus = []
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
|
new_roku = RokuDevice(host)
|
||||||
|
|
||||||
|
if new_roku.name is None:
|
||||||
|
_LOGGER.error("Unable to initialize roku at %s", host)
|
||||||
|
else:
|
||||||
rokus.append(RokuDevice(host))
|
rokus.append(RokuDevice(host))
|
||||||
KNOWN_HOSTS.append(host)
|
KNOWN_HOSTS.append(host)
|
||||||
|
|
||||||
@ -61,6 +66,11 @@ class RokuDevice(MediaPlayerDevice):
|
|||||||
from roku import Roku
|
from roku import Roku
|
||||||
|
|
||||||
self.roku = Roku(host)
|
self.roku = Roku(host)
|
||||||
|
self.roku_name = None
|
||||||
|
self.ip_address = host
|
||||||
|
self.channels = []
|
||||||
|
self.current_app = None
|
||||||
|
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
@ -78,7 +88,7 @@ class RokuDevice(MediaPlayerDevice):
|
|||||||
self.current_app = None
|
self.current_app = None
|
||||||
except (requests.exceptions.ConnectionError,
|
except (requests.exceptions.ConnectionError,
|
||||||
requests.exceptions.ReadTimeout):
|
requests.exceptions.ReadTimeout):
|
||||||
self.current_app = None
|
_LOGGER.error("Unable to connect to roku at %s", self.ip_address)
|
||||||
|
|
||||||
def get_source_list(self):
|
def get_source_list(self):
|
||||||
"""Get the list of applications to be used as sources."""
|
"""Get the list of applications to be used as sources."""
|
||||||
|
@ -117,7 +117,7 @@ https://github.com/Xorso/pyalarmdotcom/archive/0.1.1.zip#pyalarmdotcom==0.1.1
|
|||||||
https://github.com/aparraga/braviarc/archive/0.3.2.zip#braviarc==0.3.2
|
https://github.com/aparraga/braviarc/archive/0.3.2.zip#braviarc==0.3.2
|
||||||
|
|
||||||
# homeassistant.components.media_player.roku
|
# homeassistant.components.media_player.roku
|
||||||
https://github.com/bah2830/python-roku/archive/3.1.1.zip#python-roku==3.1.1
|
https://github.com/bah2830/python-roku/archive/3.1.2.zip#roku==3.1.2
|
||||||
|
|
||||||
# homeassistant.components.modbus
|
# homeassistant.components.modbus
|
||||||
https://github.com/bashwork/pymodbus/archive/d7fc4f1cc975631e0a9011390e8017f64b612661.zip#pymodbus==1.2.0
|
https://github.com/bashwork/pymodbus/archive/d7fc4f1cc975631e0a9011390e8017f64b612661.zip#pymodbus==1.2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user