ab8c127a4a466f2c137239c0eb06c8143adea106,homeassistant/components/media_player/firetv.py,,setup_platform,#Any#Any#Any#Any#,48
Before Change
port = config.get(CONF_PORT)
device_id = config.get(CONF_DEVICE)
try:
response = requests.get(
DEVICE_LIST_URL.format(proto, host, port)).json()
if device_id in response[CONF_DEVICES].keys():
add_entities([FireTVDevice(proto, host, port, device_id, name)])
_LOGGER.info("Device %s accessible and ready for control",
device_id)
else:
_LOGGER.warning("Device %s is not registered with firetv-server",
device_id)
except requests.exceptions.RequestException:
_LOGGER.error("Could not connect to firetv-server at %s", host)
class FireTV:
The firetv-server client.
Should a native Python 3 ADB module become available, python-firetv can
After Change
device = FireTVDevice(ftv, name, get_source, get_sources)
add_entities([device])
_LOGGER.info("Setup Fire TV at %s%s", host, adb_log)
def adb_decorator(override_available=False):
Send an ADB command if the device is available and not locked.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: home-assistant/home-assistant
Commit Name: ab8c127a4a466f2c137239c0eb06c8143adea106
Time: 2018-11-18
Author: JeffLIrion@users.noreply.github.com
File Name: homeassistant/components/media_player/firetv.py
Class Name:
Method Name: setup_platform
Project Name: MTG/freesound
Commit Name: 0f7bacc26eec44c9f00f5d7666c1f87f0e051ce2
Time: 2017-11-10
Author: andres.ferraro@upf.edu
File Name: search/management/commands/reindex_solr.py
Class Name: Command
Method Name: handle
Project Name: GoogleCloudPlatform/healthcare
Commit Name: a63058774af9690888e8e5586dd956df3669e6d4
Time: 2019-02-04
Author: noreply@google.com
File Name: deploy/create_project.py
Class Name:
Method Name: create_stackdriver_account