mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Add support for input_number entities in Alexa integration (#30139)
* Add support for input_number entities * Update homeassistant/components/alexa/capabilities.py Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io> * Removed get methods to directly access required attributes dicts. Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
committed by
Paulus Schoutsen
parent
7f2921b0e6
commit
a2678b2aff
@@ -11,6 +11,7 @@ from homeassistant.components import (
|
||||
group,
|
||||
image_processing,
|
||||
input_boolean,
|
||||
input_number,
|
||||
light,
|
||||
lock,
|
||||
media_player,
|
||||
@@ -674,3 +675,21 @@ class ImageProcessingCapabilities(AlexaEntity):
|
||||
yield AlexaEventDetectionSensor(self.hass, self.entity)
|
||||
yield AlexaEndpointHealth(self.hass, self.entity)
|
||||
yield Alexa(self.hass)
|
||||
|
||||
|
||||
@ENTITY_ADAPTERS.register(input_number.DOMAIN)
|
||||
class InputNumberCapabilities(AlexaEntity):
|
||||
"""Class to represent input_number capabilities."""
|
||||
|
||||
def default_display_categories(self):
|
||||
"""Return the display categories for this entity."""
|
||||
return [DisplayCategory.OTHER]
|
||||
|
||||
def interfaces(self):
|
||||
"""Yield the supported interfaces."""
|
||||
|
||||
yield AlexaRangeController(
|
||||
self.entity, instance=f"{input_number.DOMAIN}.{input_number.ATTR_VALUE}"
|
||||
)
|
||||
yield AlexaEndpointHealth(self.hass, self.entity)
|
||||
yield Alexa(self.hass)
|
||||
|
||||
Reference in New Issue
Block a user