Search is not available for this dataset
identifier
stringlengths
1
155
parameters
stringlengths
2
6.09k
docstring
stringlengths
11
63.4k
docstring_summary
stringlengths
0
63.4k
function
stringlengths
29
99.8k
function_tokens
list
start_point
list
end_point
list
language
stringclasses
1 value
docstring_language
stringlengths
2
7
docstring_language_predictions
stringlengths
18
23
is_langid_reliable
stringclasses
2 values
AlexaLockController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "lockState"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"lockState\"", "}", "]" ]
[ 431, 4 ]
[ 433, 38 ]
python
en
['en', 'en', 'en']
True
AlexaLockController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 435, 4 ]
[ 437, 19 ]
python
en
['en', 'af', 'en']
True
AlexaLockController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 439, 4 ]
[ 441, 19 ]
python
en
['en', 'en', 'en']
True
AlexaLockController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "lockState": raise UnsupportedProperty(name) if self.entity.state == STATE_LOCKED: return "LOCKED" if self.entity.state == STATE_UNLOCKED: return "UNLOCKED" return "JAM...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"lockState\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "if", "self", ".", "entity", ".", "state", "==", "STATE_LOCKED", ":", "return", "\"LOCKED\"", "if", "self...
[ 443, 4 ]
[ 452, 23 ]
python
en
['en', 'en', 'en']
True
AlexaSceneController.__init__
(self, entity, supports_deactivation)
Initialize the entity.
Initialize the entity.
def __init__(self, entity, supports_deactivation): """Initialize the entity.""" super().__init__(entity) self.supports_deactivation = lambda: supports_deactivation
[ "def", "__init__", "(", "self", ",", "entity", ",", "supports_deactivation", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ")", "self", ".", "supports_deactivation", "=", "lambda", ":", "supports_deactivation" ]
[ 474, 4 ]
[ 477, 66 ]
python
en
['en', 'en', 'en']
True
AlexaSceneController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.SceneController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.SceneController\"" ]
[ 479, 4 ]
[ 481, 38 ]
python
en
['en', 'mi', 'en']
True
AlexaBrightnessController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.BrightnessController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.BrightnessController\"" ]
[ 505, 4 ]
[ 507, 43 ]
python
en
['en', 'mi', 'en']
True
AlexaBrightnessController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "brightness"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"brightness\"", "}", "]" ]
[ 509, 4 ]
[ 511, 39 ]
python
en
['en', 'en', 'en']
True
AlexaBrightnessController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 513, 4 ]
[ 515, 19 ]
python
en
['en', 'en', 'en']
True
AlexaBrightnessController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 517, 4 ]
[ 519, 19 ]
python
en
['en', 'af', 'en']
True
AlexaBrightnessController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "brightness": raise UnsupportedProperty(name) if "brightness" in self.entity.attributes: return round(self.entity.attributes["brightness"] / 255.0 * 100) return 0
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"brightness\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "if", "\"brightness\"", "in", "self", ".", "entity", ".", "attributes", ":", "return", "round", "(", "se...
[ 521, 4 ]
[ 527, 16 ]
python
en
['en', 'en', 'en']
True
AlexaColorController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.ColorController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.ColorController\"" ]
[ 551, 4 ]
[ 553, 38 ]
python
en
['en', 'mi', 'en']
True
AlexaColorController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "color"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"color\"", "}", "]" ]
[ 555, 4 ]
[ 557, 34 ]
python
en
['en', 'en', 'en']
True
AlexaColorController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 559, 4 ]
[ 561, 19 ]
python
en
['en', 'en', 'en']
True
AlexaColorController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 563, 4 ]
[ 565, 19 ]
python
en
['en', 'af', 'en']
True
AlexaColorController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "color": raise UnsupportedProperty(name) hue, saturation = self.entity.attributes.get(light.ATTR_HS_COLOR, (0, 0)) return { "hue": hue, "saturation": saturation / 100.0, ...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"color\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "hue", ",", "saturation", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "light", ".", "...
[ 567, 4 ]
[ 578, 9 ]
python
en
['en', 'en', 'en']
True
AlexaColorTemperatureController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.ColorTemperatureController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.ColorTemperatureController\"" ]
[ 602, 4 ]
[ 604, 49 ]
python
en
['en', 'mi', 'en']
True
AlexaColorTemperatureController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "colorTemperatureInKelvin"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"colorTemperatureInKelvin\"", "}", "]" ]
[ 606, 4 ]
[ 608, 53 ]
python
en
['en', 'en', 'en']
True
AlexaColorTemperatureController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 610, 4 ]
[ 612, 19 ]
python
en
['en', 'en', 'en']
True
AlexaColorTemperatureController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 614, 4 ]
[ 616, 19 ]
python
en
['en', 'af', 'en']
True
AlexaColorTemperatureController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "colorTemperatureInKelvin": raise UnsupportedProperty(name) if "color_temp" in self.entity.attributes: return color_util.color_temperature_mired_to_kelvin( self.entity.attributes["c...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"colorTemperatureInKelvin\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "if", "\"color_temp\"", "in", "self", ".", "entity", ".", "attributes", ":", "return", "color_...
[ 618, 4 ]
[ 626, 19 ]
python
en
['en', 'en', 'en']
True
AlexaPercentageController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.PercentageController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.PercentageController\"" ]
[ 648, 4 ]
[ 650, 43 ]
python
en
['en', 'mi', 'en']
True
AlexaPercentageController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "percentage"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"percentage\"", "}", "]" ]
[ 652, 4 ]
[ 654, 39 ]
python
en
['en', 'en', 'en']
True
AlexaPercentageController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 656, 4 ]
[ 658, 19 ]
python
en
['en', 'en', 'en']
True
AlexaPercentageController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 660, 4 ]
[ 662, 19 ]
python
en
['en', 'af', 'en']
True
AlexaPercentageController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "percentage": raise UnsupportedProperty(name) if self.entity.domain == fan.DOMAIN: speed = self.entity.attributes.get(fan.ATTR_SPEED) return PERCENTAGE_FAN_MAP.get(speed, 0) ...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"percentage\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "if", "self", ".", "entity", ".", "domain", "==", "fan", ".", "DOMAIN", ":", "speed", "=", "self", "...
[ 664, 4 ]
[ 677, 16 ]
python
en
['en', 'en', 'en']
True
AlexaSpeaker.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.Speaker"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.Speaker\"" ]
[ 699, 4 ]
[ 701, 30 ]
python
en
['en', 'mi', 'en']
True
AlexaSpeaker.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" properties = [{"name": "volume"}] supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0) if supported & media_player.SUPPORT_VOLUME_MUTE: properties.append({"name": "muted"}) ...
[ "def", "properties_supported", "(", "self", ")", ":", "properties", "=", "[", "{", "\"name\"", ":", "\"volume\"", "}", "]", "supported", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "ATTR_SUPPORTED_FEATURES", ",", "0", ")", "if", "suppor...
[ 703, 4 ]
[ 711, 25 ]
python
en
['en', 'en', 'en']
True
AlexaSpeaker.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 713, 4 ]
[ 715, 19 ]
python
en
['en', 'en', 'en']
True
AlexaSpeaker.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 717, 4 ]
[ 719, 19 ]
python
en
['en', 'af', 'en']
True
AlexaSpeaker.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name == "volume": current_level = self.entity.attributes.get( media_player.ATTR_MEDIA_VOLUME_LEVEL ) if current_level is not None: return round(float(current_level) * 10...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "==", "\"volume\"", ":", "current_level", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "media_player", ".", "ATTR_MEDIA_VOLUME_LEVEL", ")", "if", "current_level", "is...
[ 721, 4 ]
[ 735, 19 ]
python
en
['en', 'en', 'en']
True
AlexaStepSpeaker.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.StepSpeaker"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.StepSpeaker\"" ]
[ 755, 4 ]
[ 757, 34 ]
python
en
['en', 'mi', 'en']
True
AlexaPlaybackController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.PlaybackController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.PlaybackController\"" ]
[ 768, 4 ]
[ 770, 41 ]
python
en
['en', 'mi', 'en']
True
AlexaPlaybackController.supported_operations
(self)
Return the supportedOperations object. Supported Operations: FastForward, Next, Pause, Play, Previous, Rewind, StartOver, Stop
Return the supportedOperations object.
def supported_operations(self): """Return the supportedOperations object. Supported Operations: FastForward, Next, Pause, Play, Previous, Rewind, StartOver, Stop """ supported_features = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0) operations = { media_pla...
[ "def", "supported_operations", "(", "self", ")", ":", "supported_features", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "ATTR_SUPPORTED_FEATURES", ",", "0", ")", "operations", "=", "{", "media_player", ".", "SUPPORT_NEXT_TRACK", ":", "\"Next\...
[ 772, 4 ]
[ 791, 9 ]
python
en
['en', 'en', 'en']
True
AlexaInputController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.InputController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.InputController\"" ]
[ 802, 4 ]
[ 804, 38 ]
python
en
['en', 'mi', 'en']
True
AlexaInputController.inputs
(self)
Return the list of valid supported inputs.
Return the list of valid supported inputs.
def inputs(self): """Return the list of valid supported inputs.""" source_list = self.entity.attributes.get( media_player.ATTR_INPUT_SOURCE_LIST, [] ) return AlexaInputController.get_valid_inputs(source_list)
[ "def", "inputs", "(", "self", ")", ":", "source_list", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "media_player", ".", "ATTR_INPUT_SOURCE_LIST", ",", "[", "]", ")", "return", "AlexaInputController", ".", "get_valid_inputs", "(", "source_li...
[ 806, 4 ]
[ 811, 65 ]
python
en
['en', 'en', 'en']
True
AlexaInputController.get_valid_inputs
(source_list)
Return list of supported inputs.
Return list of supported inputs.
def get_valid_inputs(source_list): """Return list of supported inputs.""" input_list = [] for source in source_list: formatted_source = ( source.lower().replace("-", "").replace("_", "").replace(" ", "") ) if formatted_source in Inputs.VALID_SO...
[ "def", "get_valid_inputs", "(", "source_list", ")", ":", "input_list", "=", "[", "]", "for", "source", "in", "source_list", ":", "formatted_source", "=", "(", "source", ".", "lower", "(", ")", ".", "replace", "(", "\"-\"", ",", "\"\"", ")", ".", "replace...
[ 814, 4 ]
[ 826, 25 ]
python
en
['en', 'en', 'en']
True
AlexaTemperatureSensor.__init__
(self, hass, entity)
Initialize the entity.
Initialize the entity.
def __init__(self, hass, entity): """Initialize the entity.""" super().__init__(entity) self.hass = hass
[ "def", "__init__", "(", "self", ",", "hass", ",", "entity", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ")", "self", ".", "hass", "=", "hass" ]
[ 848, 4 ]
[ 851, 24 ]
python
en
['en', 'en', 'en']
True
AlexaTemperatureSensor.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.TemperatureSensor"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.TemperatureSensor\"" ]
[ 853, 4 ]
[ 855, 40 ]
python
en
['en', 'mi', 'en']
True
AlexaTemperatureSensor.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "temperature"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"temperature\"", "}", "]" ]
[ 857, 4 ]
[ 859, 40 ]
python
en
['en', 'en', 'en']
True
AlexaTemperatureSensor.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 861, 4 ]
[ 863, 19 ]
python
en
['en', 'en', 'en']
True
AlexaTemperatureSensor.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 865, 4 ]
[ 867, 19 ]
python
en
['en', 'af', 'en']
True
AlexaTemperatureSensor.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "temperature": raise UnsupportedProperty(name) unit = self.entity.attributes.get(ATTR_UNIT_OF_MEASUREMENT) temp = self.entity.state if self.entity.domain == climate.DOMAIN: unit = ...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"temperature\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "unit", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "ATTR_UNIT_OF_MEASUREMENT", ")", ...
[ 869, 4 ]
[ 889, 61 ]
python
en
['en', 'en', 'en']
True
AlexaContactSensor.__init__
(self, hass, entity)
Initialize the entity.
Initialize the entity.
def __init__(self, hass, entity): """Initialize the entity.""" super().__init__(entity) self.hass = hass
[ "def", "__init__", "(", "self", ",", "hass", ",", "entity", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ")", "self", ".", "hass", "=", "hass" ]
[ 914, 4 ]
[ 917, 24 ]
python
en
['en', 'en', 'en']
True
AlexaContactSensor.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.ContactSensor"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.ContactSensor\"" ]
[ 919, 4 ]
[ 921, 36 ]
python
en
['en', 'mi', 'en']
True
AlexaContactSensor.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "detectionState"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"detectionState\"", "}", "]" ]
[ 923, 4 ]
[ 925, 43 ]
python
en
['en', 'en', 'en']
True
AlexaContactSensor.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 927, 4 ]
[ 929, 19 ]
python
en
['en', 'en', 'en']
True
AlexaContactSensor.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 931, 4 ]
[ 933, 19 ]
python
en
['en', 'af', 'en']
True
AlexaContactSensor.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "detectionState": raise UnsupportedProperty(name) if self.entity.state == STATE_ON: return "DETECTED" return "NOT_DETECTED"
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"detectionState\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "if", "self", ".", "entity", ".", "state", "==", "STATE_ON", ":", "return", "\"DETECTED\"", "return", ...
[ 935, 4 ]
[ 942, 29 ]
python
en
['en', 'en', 'en']
True
AlexaMotionSensor.__init__
(self, hass, entity)
Initialize the entity.
Initialize the entity.
def __init__(self, hass, entity): """Initialize the entity.""" super().__init__(entity) self.hass = hass
[ "def", "__init__", "(", "self", ",", "hass", ",", "entity", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ")", "self", ".", "hass", "=", "hass" ]
[ 963, 4 ]
[ 966, 24 ]
python
en
['en', 'en', 'en']
True
AlexaMotionSensor.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.MotionSensor"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.MotionSensor\"" ]
[ 968, 4 ]
[ 970, 35 ]
python
en
['en', 'mi', 'en']
True
AlexaMotionSensor.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "detectionState"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"detectionState\"", "}", "]" ]
[ 972, 4 ]
[ 974, 43 ]
python
en
['en', 'en', 'en']
True
AlexaMotionSensor.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 976, 4 ]
[ 978, 19 ]
python
en
['en', 'en', 'en']
True
AlexaMotionSensor.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 980, 4 ]
[ 982, 19 ]
python
en
['en', 'af', 'en']
True
AlexaMotionSensor.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "detectionState": raise UnsupportedProperty(name) if self.entity.state == STATE_ON: return "DETECTED" return "NOT_DETECTED"
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"detectionState\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "if", "self", ".", "entity", ".", "state", "==", "STATE_ON", ":", "return", "\"DETECTED\"", "return", ...
[ 984, 4 ]
[ 991, 29 ]
python
en
['en', 'en', 'en']
True
AlexaThermostatController.__init__
(self, hass, entity)
Initialize the entity.
Initialize the entity.
def __init__(self, hass, entity): """Initialize the entity.""" super().__init__(entity) self.hass = hass
[ "def", "__init__", "(", "self", ",", "hass", ",", "entity", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ")", "self", ".", "hass", "=", "hass" ]
[ 1014, 4 ]
[ 1017, 24 ]
python
en
['en', 'en', 'en']
True
AlexaThermostatController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.ThermostatController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.ThermostatController\"" ]
[ 1019, 4 ]
[ 1021, 43 ]
python
en
['en', 'mi', 'en']
True
AlexaThermostatController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" properties = [{"name": "thermostatMode"}] supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0) if supported & climate.SUPPORT_TARGET_TEMPERATURE: properties.append({"name": "targe...
[ "def", "properties_supported", "(", "self", ")", ":", "properties", "=", "[", "{", "\"name\"", ":", "\"thermostatMode\"", "}", "]", "supported", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "ATTR_SUPPORTED_FEATURES", ",", "0", ")", "if", ...
[ 1023, 4 ]
[ 1032, 25 ]
python
en
['en', 'en', 'en']
True
AlexaThermostatController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 1034, 4 ]
[ 1036, 19 ]
python
en
['en', 'en', 'en']
True
AlexaThermostatController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 1038, 4 ]
[ 1040, 19 ]
python
en
['en', 'af', 'en']
True
AlexaThermostatController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if self.entity.state == STATE_UNAVAILABLE: return None if name == "thermostatMode": preset = self.entity.attributes.get(climate.ATTR_PRESET_MODE) if preset in API_THERMOSTAT_PRESETS: ...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "self", ".", "entity", ".", "state", "==", "STATE_UNAVAILABLE", ":", "return", "None", "if", "name", "==", "\"thermostatMode\"", ":", "preset", "=", "self", ".", "entity", ".", "attributes", ...
[ 1042, 4 ]
[ 1085, 61 ]
python
en
['en', 'en', 'en']
True
AlexaThermostatController.configuration
(self)
Return configuration object. Translates climate HVAC_MODES and PRESETS to supported Alexa ThermostatMode Values. ThermostatMode Value must be AUTO, COOL, HEAT, ECO, OFF, or CUSTOM.
Return configuration object.
def configuration(self): """Return configuration object. Translates climate HVAC_MODES and PRESETS to supported Alexa ThermostatMode Values. ThermostatMode Value must be AUTO, COOL, HEAT, ECO, OFF, or CUSTOM. """ supported_modes = [] hvac_modes = self.entity.attributes.g...
[ "def", "configuration", "(", "self", ")", ":", "supported_modes", "=", "[", "]", "hvac_modes", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "climate", ".", "ATTR_HVAC_MODES", ")", "for", "mode", "in", "hvac_modes", ":", "thermostat_mode", ...
[ 1087, 4 ]
[ 1113, 28 ]
python
en
['en', 'bg', 'en']
True
AlexaPowerLevelController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.PowerLevelController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.PowerLevelController\"" ]
[ 1135, 4 ]
[ 1137, 43 ]
python
en
['en', 'mi', 'en']
True
AlexaPowerLevelController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "powerLevel"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"powerLevel\"", "}", "]" ]
[ 1139, 4 ]
[ 1141, 39 ]
python
en
['en', 'en', 'en']
True
AlexaPowerLevelController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 1143, 4 ]
[ 1145, 19 ]
python
en
['en', 'en', 'en']
True
AlexaPowerLevelController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 1147, 4 ]
[ 1149, 19 ]
python
en
['en', 'af', 'en']
True
AlexaPowerLevelController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "powerLevel": raise UnsupportedProperty(name) if self.entity.domain == fan.DOMAIN: speed = self.entity.attributes.get(fan.ATTR_SPEED) return PERCENTAGE_FAN_MAP.get(speed) ret...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"powerLevel\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "if", "self", ".", "entity", ".", "domain", "==", "fan", ".", "DOMAIN", ":", "speed", "=", "self", "...
[ 1151, 4 ]
[ 1161, 19 ]
python
en
['en', 'en', 'en']
True
AlexaSecurityPanelController.__init__
(self, hass, entity)
Initialize the entity.
Initialize the entity.
def __init__(self, hass, entity): """Initialize the entity.""" super().__init__(entity) self.hass = hass
[ "def", "__init__", "(", "self", ",", "hass", ",", "entity", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ")", "self", ".", "hass", "=", "hass" ]
[ 1187, 4 ]
[ 1190, 24 ]
python
en
['en', 'en', 'en']
True
AlexaSecurityPanelController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.SecurityPanelController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.SecurityPanelController\"" ]
[ 1192, 4 ]
[ 1194, 46 ]
python
en
['en', 'mi', 'en']
True
AlexaSecurityPanelController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "armState"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"armState\"", "}", "]" ]
[ 1196, 4 ]
[ 1198, 37 ]
python
en
['en', 'en', 'en']
True
AlexaSecurityPanelController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 1200, 4 ]
[ 1202, 19 ]
python
en
['en', 'en', 'en']
True
AlexaSecurityPanelController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 1204, 4 ]
[ 1206, 19 ]
python
en
['en', 'af', 'en']
True
AlexaSecurityPanelController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "armState": raise UnsupportedProperty(name) arm_state = self.entity.state if arm_state == STATE_ALARM_ARMED_HOME: return "ARMED_STAY" if arm_state == STATE_ALARM_ARMED_AWAY: ...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"armState\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "arm_state", "=", "self", ".", "entity", ".", "state", "if", "arm_state", "==", "STATE_ALARM_ARMED_HOME", ":...
[ 1208, 4 ]
[ 1222, 25 ]
python
en
['en', 'en', 'en']
True
AlexaSecurityPanelController.configuration
(self)
Return configuration object with supported authorization types.
Return configuration object with supported authorization types.
def configuration(self): """Return configuration object with supported authorization types.""" code_format = self.entity.attributes.get(ATTR_CODE_FORMAT) supported = self.entity.attributes[ATTR_SUPPORTED_FEATURES] configuration = {} supported_arm_states = [{"value": "DISARMED"}]...
[ "def", "configuration", "(", "self", ")", ":", "code_format", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "ATTR_CODE_FORMAT", ")", "supported", "=", "self", ".", "entity", ".", "attributes", "[", "ATTR_SUPPORTED_FEATURES", "]", "configurati...
[ 1224, 4 ]
[ 1243, 28 ]
python
en
['en', 'en', 'en']
True
AlexaModeController.__init__
(self, entity, instance, non_controllable=False)
Initialize the entity.
Initialize the entity.
def __init__(self, entity, instance, non_controllable=False): """Initialize the entity.""" super().__init__(entity, instance) self._resource = None self._semantics = None self.properties_non_controllable = lambda: non_controllable
[ "def", "__init__", "(", "self", ",", "entity", ",", "instance", ",", "non_controllable", "=", "False", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ",", "instance", ")", "self", ".", "_resource", "=", "None", "self", ".", "_semantics", ...
[ 1276, 4 ]
[ 1281, 67 ]
python
en
['en', 'en', 'en']
True
AlexaModeController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.ModeController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.ModeController\"" ]
[ 1283, 4 ]
[ 1285, 37 ]
python
en
['en', 'mi', 'en']
True
AlexaModeController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "mode"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"mode\"", "}", "]" ]
[ 1287, 4 ]
[ 1289, 33 ]
python
en
['en', 'en', 'en']
True
AlexaModeController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 1291, 4 ]
[ 1293, 19 ]
python
en
['en', 'en', 'en']
True
AlexaModeController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 1295, 4 ]
[ 1297, 19 ]
python
en
['en', 'af', 'en']
True
AlexaModeController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "mode": raise UnsupportedProperty(name) # Fan Direction if self.instance == f"{fan.DOMAIN}.{fan.ATTR_DIRECTION}": mode = self.entity.attributes.get(fan.ATTR_DIRECTION, None) if...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"mode\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "# Fan Direction", "if", "self", ".", "instance", "==", "f\"{fan.DOMAIN}.{fan.ATTR_DIRECTION}\"", ":", "mode", "=", ...
[ 1299, 4 ]
[ 1323, 19 ]
python
en
['en', 'en', 'en']
True
AlexaModeController.configuration
(self)
Return configuration with modeResources.
Return configuration with modeResources.
def configuration(self): """Return configuration with modeResources.""" if isinstance(self._resource, AlexaCapabilityResource): return self._resource.serialize_configuration() return None
[ "def", "configuration", "(", "self", ")", ":", "if", "isinstance", "(", "self", ".", "_resource", ",", "AlexaCapabilityResource", ")", ":", "return", "self", ".", "_resource", ".", "serialize_configuration", "(", ")", "return", "None" ]
[ 1325, 4 ]
[ 1330, 19 ]
python
en
['en', 'en', 'en']
True
AlexaModeController.capability_resources
(self)
Return capabilityResources object.
Return capabilityResources object.
def capability_resources(self): """Return capabilityResources object.""" # Fan Direction Resource if self.instance == f"{fan.DOMAIN}.{fan.ATTR_DIRECTION}": self._resource = AlexaModeResource( [AlexaGlobalCatalog.SETTING_DIRECTION], False ) sel...
[ "def", "capability_resources", "(", "self", ")", ":", "# Fan Direction Resource", "if", "self", ".", "instance", "==", "f\"{fan.DOMAIN}.{fan.ATTR_DIRECTION}\"", ":", "self", ".", "_resource", "=", "AlexaModeResource", "(", "[", "AlexaGlobalCatalog", ".", "SETTING_DIRECT...
[ 1332, 4 ]
[ 1367, 19 ]
python
en
['en', 'en', 'en']
True
AlexaModeController.semantics
(self)
Build and return semantics object.
Build and return semantics object.
def semantics(self): """Build and return semantics object.""" supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0) # Cover Position if self.instance == f"{cover.DOMAIN}.{cover.ATTR_POSITION}": lower_labels = [AlexaSemantics.ACTION_LOWER] raise_label...
[ "def", "semantics", "(", "self", ")", ":", "supported", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "ATTR_SUPPORTED_FEATURES", ",", "0", ")", "# Cover Position", "if", "self", ".", "instance", "==", "f\"{cover.DOMAIN}.{cover.ATTR_POSITION}\"", ...
[ 1369, 4 ]
[ 1405, 19 ]
python
en
['en', 'ca', 'en']
True
AlexaRangeController.__init__
(self, entity, instance, non_controllable=False)
Initialize the entity.
Initialize the entity.
def __init__(self, entity, instance, non_controllable=False): """Initialize the entity.""" super().__init__(entity, instance) self._resource = None self._semantics = None self.properties_non_controllable = lambda: non_controllable
[ "def", "__init__", "(", "self", ",", "entity", ",", "instance", ",", "non_controllable", "=", "False", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ",", "instance", ")", "self", ".", "_resource", "=", "None", "self", ".", "_semantics", ...
[ 1438, 4 ]
[ 1443, 67 ]
python
en
['en', 'en', 'en']
True
AlexaRangeController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.RangeController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.RangeController\"" ]
[ 1445, 4 ]
[ 1447, 38 ]
python
en
['en', 'mi', 'en']
True
AlexaRangeController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "rangeValue"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"rangeValue\"", "}", "]" ]
[ 1449, 4 ]
[ 1451, 39 ]
python
en
['en', 'en', 'en']
True
AlexaRangeController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 1453, 4 ]
[ 1455, 19 ]
python
en
['en', 'en', 'en']
True
AlexaRangeController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 1457, 4 ]
[ 1459, 19 ]
python
en
['en', 'af', 'en']
True
AlexaRangeController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "rangeValue": raise UnsupportedProperty(name) # Return None for unavailable and unknown states. # Allows the Alexa.EndpointHealth Interface to handle the unavailable state in a stateReport. if...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"rangeValue\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "# Return None for unavailable and unknown states.", "# Allows the Alexa.EndpointHealth Interface to handle the unavailable st...
[ 1461, 4 ]
[ 1503, 19 ]
python
en
['en', 'en', 'en']
True
AlexaRangeController.configuration
(self)
Return configuration with presetResources.
Return configuration with presetResources.
def configuration(self): """Return configuration with presetResources.""" if isinstance(self._resource, AlexaCapabilityResource): return self._resource.serialize_configuration() return None
[ "def", "configuration", "(", "self", ")", ":", "if", "isinstance", "(", "self", ".", "_resource", ",", "AlexaCapabilityResource", ")", ":", "return", "self", ".", "_resource", ".", "serialize_configuration", "(", ")", "return", "None" ]
[ 1505, 4 ]
[ 1510, 19 ]
python
en
['en', 'en', 'en']
True
AlexaRangeController.capability_resources
(self)
Return capabilityResources object.
Return capabilityResources object.
def capability_resources(self): """Return capabilityResources object.""" # Fan Speed Resources if self.instance == f"{fan.DOMAIN}.{fan.ATTR_SPEED}": speed_list = self.entity.attributes[fan.ATTR_SPEED_LIST] max_value = len(speed_list) - 1 self._resource = Alex...
[ "def", "capability_resources", "(", "self", ")", ":", "# Fan Speed Resources", "if", "self", ".", "instance", "==", "f\"{fan.DOMAIN}.{fan.ATTR_SPEED}\"", ":", "speed_list", "=", "self", ".", "entity", ".", "attributes", "[", "fan", ".", "ATTR_SPEED_LIST", "]", "ma...
[ 1512, 4 ]
[ 1603, 19 ]
python
en
['en', 'en', 'en']
True
AlexaRangeController.semantics
(self)
Build and return semantics object.
Build and return semantics object.
def semantics(self): """Build and return semantics object.""" supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0) # Cover Position if self.instance == f"{cover.DOMAIN}.{cover.ATTR_POSITION}": lower_labels = [AlexaSemantics.ACTION_LOWER] raise_label...
[ "def", "semantics", "(", "self", ")", ":", "supported", "=", "self", ".", "entity", ".", "attributes", ".", "get", "(", "ATTR_SUPPORTED_FEATURES", ",", "0", ")", "# Cover Position", "if", "self", ".", "instance", "==", "f\"{cover.DOMAIN}.{cover.ATTR_POSITION}\"", ...
[ 1605, 4 ]
[ 1649, 19 ]
python
en
['en', 'ca', 'en']
True
AlexaToggleController.__init__
(self, entity, instance, non_controllable=False)
Initialize the entity.
Initialize the entity.
def __init__(self, entity, instance, non_controllable=False): """Initialize the entity.""" super().__init__(entity, instance) self._resource = None self._semantics = None self.properties_non_controllable = lambda: non_controllable
[ "def", "__init__", "(", "self", ",", "entity", ",", "instance", ",", "non_controllable", "=", "False", ")", ":", "super", "(", ")", ".", "__init__", "(", "entity", ",", "instance", ")", "self", ".", "_resource", "=", "None", "self", ".", "_semantics", ...
[ 1683, 4 ]
[ 1688, 67 ]
python
en
['en', 'en', 'en']
True
AlexaToggleController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.ToggleController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.ToggleController\"" ]
[ 1690, 4 ]
[ 1692, 39 ]
python
en
['en', 'mi', 'en']
True
AlexaToggleController.properties_supported
(self)
Return what properties this entity supports.
Return what properties this entity supports.
def properties_supported(self): """Return what properties this entity supports.""" return [{"name": "toggleState"}]
[ "def", "properties_supported", "(", "self", ")", ":", "return", "[", "{", "\"name\"", ":", "\"toggleState\"", "}", "]" ]
[ 1694, 4 ]
[ 1696, 40 ]
python
en
['en', 'en', 'en']
True
AlexaToggleController.properties_proactively_reported
(self)
Return True if properties asynchronously reported.
Return True if properties asynchronously reported.
def properties_proactively_reported(self): """Return True if properties asynchronously reported.""" return True
[ "def", "properties_proactively_reported", "(", "self", ")", ":", "return", "True" ]
[ 1698, 4 ]
[ 1700, 19 ]
python
en
['en', 'en', 'en']
True
AlexaToggleController.properties_retrievable
(self)
Return True if properties can be retrieved.
Return True if properties can be retrieved.
def properties_retrievable(self): """Return True if properties can be retrieved.""" return True
[ "def", "properties_retrievable", "(", "self", ")", ":", "return", "True" ]
[ 1702, 4 ]
[ 1704, 19 ]
python
en
['en', 'af', 'en']
True
AlexaToggleController.get_property
(self, name)
Read and return a property.
Read and return a property.
def get_property(self, name): """Read and return a property.""" if name != "toggleState": raise UnsupportedProperty(name) # Fan Oscillating if self.instance == f"{fan.DOMAIN}.{fan.ATTR_OSCILLATING}": is_on = bool(self.entity.attributes.get(fan.ATTR_OSCILLATING)) ...
[ "def", "get_property", "(", "self", ",", "name", ")", ":", "if", "name", "!=", "\"toggleState\"", ":", "raise", "UnsupportedProperty", "(", "name", ")", "# Fan Oscillating", "if", "self", ".", "instance", "==", "f\"{fan.DOMAIN}.{fan.ATTR_OSCILLATING}\"", ":", "is_...
[ 1706, 4 ]
[ 1716, 19 ]
python
en
['en', 'en', 'en']
True
AlexaToggleController.capability_resources
(self)
Return capabilityResources object.
Return capabilityResources object.
def capability_resources(self): """Return capabilityResources object.""" # Fan Oscillating Resource if self.instance == f"{fan.DOMAIN}.{fan.ATTR_OSCILLATING}": self._resource = AlexaCapabilityResource( [AlexaGlobalCatalog.SETTING_OSCILLATE, "Rotate", "Rotation"] ...
[ "def", "capability_resources", "(", "self", ")", ":", "# Fan Oscillating Resource", "if", "self", ".", "instance", "==", "f\"{fan.DOMAIN}.{fan.ATTR_OSCILLATING}\"", ":", "self", ".", "_resource", "=", "AlexaCapabilityResource", "(", "[", "AlexaGlobalCatalog", ".", "SETT...
[ 1718, 4 ]
[ 1728, 19 ]
python
en
['en', 'en', 'en']
True
AlexaChannelController.name
(self)
Return the Alexa API name of this interface.
Return the Alexa API name of this interface.
def name(self): """Return the Alexa API name of this interface.""" return "Alexa.ChannelController"
[ "def", "name", "(", "self", ")", ":", "return", "\"Alexa.ChannelController\"" ]
[ 1753, 4 ]
[ 1755, 40 ]
python
en
['en', 'mi', 'en']
True