Add number platform support to Alexa (#86553)
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
This commit is contained in:
parent
23c9580a4a
commit
f182e314e5
5 changed files with 216 additions and 37 deletions
|
@ -23,6 +23,7 @@ from homeassistant.components import (
|
|||
light,
|
||||
lock,
|
||||
media_player,
|
||||
number,
|
||||
scene,
|
||||
script,
|
||||
sensor,
|
||||
|
@ -853,8 +854,9 @@ class ImageProcessingCapabilities(AlexaEntity):
|
|||
|
||||
|
||||
@ENTITY_ADAPTERS.register(input_number.DOMAIN)
|
||||
@ENTITY_ADAPTERS.register(number.DOMAIN)
|
||||
class InputNumberCapabilities(AlexaEntity):
|
||||
"""Class to represent input_number capabilities."""
|
||||
"""Class to represent number and input_number capabilities."""
|
||||
|
||||
def default_display_categories(self):
|
||||
"""Return the display categories for this entity."""
|
||||
|
@ -862,10 +864,8 @@ class InputNumberCapabilities(AlexaEntity):
|
|||
|
||||
def interfaces(self):
|
||||
"""Yield the supported interfaces."""
|
||||
|
||||
yield AlexaRangeController(
|
||||
self.entity, instance=f"{input_number.DOMAIN}.{input_number.ATTR_VALUE}"
|
||||
)
|
||||
domain = self.entity.domain
|
||||
yield AlexaRangeController(self.entity, instance=f"{domain}.value")
|
||||
yield AlexaEndpointHealth(self.hass, self.entity)
|
||||
yield Alexa(self.hass)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue