core/homeassistant/components/frontier_silicon/media_player.py

283 lines
7.8 KiB
Python
Raw Normal View History

"""Support for Frontier Silicon Devices (Medion, Hama, Auna,...)."""
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
import logging
from afsapi import AFSAPI
import requests
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
2019-07-31 19:25:30 +00:00
MEDIA_TYPE_MUSIC,
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
SUPPORT_PLAY,
SUPPORT_PLAY_MEDIA,
SUPPORT_PREVIOUS_TRACK,
SUPPORT_SEEK,
SUPPORT_SELECT_SOURCE,
SUPPORT_STOP,
SUPPORT_TURN_OFF,
SUPPORT_TURN_ON,
SUPPORT_VOLUME_MUTE,
SUPPORT_VOLUME_SET,
SUPPORT_VOLUME_STEP,
)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
from homeassistant.const import (
2019-07-31 19:25:30 +00:00
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
STATE_OFF,
STATE_PAUSED,
STATE_PLAYING,
STATE_UNKNOWN,
)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
2019-07-31 19:25:30 +00:00
SUPPORT_FRONTIER_SILICON = (
SUPPORT_PAUSE
| SUPPORT_VOLUME_SET
| SUPPORT_VOLUME_MUTE
| SUPPORT_VOLUME_STEP
| SUPPORT_PREVIOUS_TRACK
| SUPPORT_NEXT_TRACK
| SUPPORT_SEEK
| SUPPORT_PLAY_MEDIA
| SUPPORT_PLAY
| SUPPORT_STOP
| SUPPORT_TURN_ON
| SUPPORT_TURN_OFF
| SUPPORT_SELECT_SOURCE
)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
DEFAULT_PORT = 80
2019-07-31 19:25:30 +00:00
DEFAULT_PASSWORD = "1234"
DEVICE_URL = "http://{0}:{1}/device"
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
2019-07-31 19:25:30 +00:00
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_PASSWORD, default=DEFAULT_PASSWORD): cv.string,
}
)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
2019-07-31 19:25:30 +00:00
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Frontier Silicon platform."""
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
if discovery_info is not None:
async_add_entities(
2019-07-31 19:25:30 +00:00
[AFSAPIDevice(discovery_info["ssdp_description"], DEFAULT_PASSWORD)], True
)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
return True
host = config.get(CONF_HOST)
port = config.get(CONF_PORT)
password = config.get(CONF_PASSWORD)
try:
async_add_entities(
2019-07-31 19:25:30 +00:00
[AFSAPIDevice(DEVICE_URL.format(host, port), password)], True
)
_LOGGER.debug("FSAPI device %s:%s -> %s", host, port, password)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
return True
except requests.exceptions.RequestException:
2019-07-31 19:25:30 +00:00
_LOGGER.error(
"Could not add the FSAPI device at %s:%s -> %s", host, port, password
)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
return False
class AFSAPIDevice(MediaPlayerDevice):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Representation of a Frontier Silicon device on the network."""
def __init__(self, device_url, password):
"""Initialize the Frontier Silicon API device."""
self._device_url = device_url
self._password = password
2018-09-09 12:26:06 +00:00
self._state = None
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
self._name = None
self._title = None
self._artist = None
self._album_name = None
self._mute = None
self._source = None
self._source_list = None
self._media_image_url = None
# Properties
@property
def fs_device(self):
"""
Create a fresh fsapi session.
A new session is created for each request in case someone else
connected to the device in between the updates and invalidated the
existing session (i.e UNDOK).
"""
return AFSAPI(self._device_url, self._password)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
@property
def should_poll(self):
"""Device should be polled."""
return True
@property
def name(self):
"""Return the device name."""
return self._name
@property
def media_title(self):
"""Title of current playing media."""
return self._title
@property
def media_artist(self):
"""Artist of current playing media, music track only."""
return self._artist
@property
def media_album_name(self):
"""Album name of current playing media, music track only."""
return self._album_name
@property
def media_content_type(self):
"""Content type of current playing media."""
return MEDIA_TYPE_MUSIC
@property
def supported_features(self):
"""Flag of media commands that are supported."""
return SUPPORT_FRONTIER_SILICON
@property
def state(self):
"""Return the state of the player."""
return self._state
# source
@property
def source_list(self):
"""List of available input sources."""
return self._source_list
@property
def source(self):
"""Name of the current input source."""
return self._source
@property
def media_image_url(self):
"""Image url of current playing media."""
return self._media_image_url
async def async_update(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Get the latest date and update device state."""
fs_device = self.fs_device
if not self._name:
self._name = await fs_device.get_friendly_name()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
if not self._source_list:
self._source_list = await fs_device.get_mode_list()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
status = await fs_device.get_play_status()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
self._state = {
2019-07-31 19:25:30 +00:00
"playing": STATE_PLAYING,
"paused": STATE_PAUSED,
"stopped": STATE_OFF,
"unknown": STATE_UNKNOWN,
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
None: STATE_OFF,
}.get(status, STATE_UNKNOWN)
if self._state != STATE_OFF:
info_name = await fs_device.get_play_name()
info_text = await fs_device.get_play_text()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
2019-07-31 19:25:30 +00:00
self._title = " - ".join(filter(None, [info_name, info_text]))
self._artist = await fs_device.get_play_artist()
self._album_name = await fs_device.get_play_album()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
self._source = await fs_device.get_mode()
self._mute = await fs_device.get_mute()
self._media_image_url = await fs_device.get_play_graphic()
else:
self._title = None
self._artist = None
self._album_name = None
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
self._source = None
self._mute = None
self._media_image_url = None
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
# Management actions
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
# power control
async def async_turn_on(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Turn on the device."""
await self.fs_device.set_power(True)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_turn_off(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Turn off the device."""
await self.fs_device.set_power(False)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_media_play(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send play command."""
await self.fs_device.play()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_media_pause(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send pause command."""
await self.fs_device.pause()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_media_play_pause(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send play/pause command."""
2019-07-31 19:25:30 +00:00
if "playing" in self._state:
await self.fs_device.pause()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
else:
await self.fs_device.play()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_media_stop(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send play/pause command."""
await self.fs_device.pause()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_media_previous_track(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send previous track command (results in rewind)."""
await self.fs_device.rewind()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_media_next_track(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send next track command (results in fast-forward)."""
await self.fs_device.forward()
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
# mute
@property
def is_volume_muted(self):
"""Boolean if volume is currently muted."""
return self._mute
async def async_mute_volume(self, mute):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send mute command."""
await self.fs_device.set_mute(mute)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
# volume
async def async_volume_up(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send volume up command."""
volume = await self.fs_device.get_volume()
2019-07-31 19:25:30 +00:00
await self.fs_device.set_volume(volume + 1)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_volume_down(self):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Send volume down command."""
volume = await self.fs_device.get_volume()
2019-07-31 19:25:30 +00:00
await self.fs_device.set_volume(volume - 1)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_set_volume_level(self, volume):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Set volume command."""
await self.fs_device.set_volume(volume)
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
async def async_select_source(self, source):
Frontier silicon (#6131) * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * changed info to debug * added frontier_silicon constant * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * added the frontier_silicon component * trying to satisfy pylint * fsapi version 0.0.6 * remove white space * generated requirements * added the frontier_silicon component * cleaning up according to travis * trying to satisfy pylint * trying to satisfy pylint * fsapi version 0.0.6 * with fsapi version 0.0.7 * added fsapi dependency * yielding the FSAPI * Removing white space from docstring * Removing white space from an empty line * Switching to sync * clean up white spaces and rename device to FSAPIDevice * trying to satisfy pylint * changed info to debug * added the frontier_silicon component * fsapi version 0.0.6 * generated requirements * pylint * moved import requests to the method where it is being used * add a basic unit test * cleaned up source code * added frontier_silicon constant * added the frontier_silicon component * added basic test * added fsapi to requirements_all.txt * added coverage omit, though a basic test was included * added MEDIA_TYPE_MUSIC for artist and album * removed duplicate cons * switched fsapi call to a property, removed unecessary comment * detailed docstring for fs_device * added a space for the info_name - info_text separator * reduced proeprty (fsapi) access for volume down/up
2017-02-28 14:23:07 +00:00
"""Select input source."""
await self.fs_device.set_mode(source)