Make sure HassToggle and HassSetPosition have description (#118267)

This commit is contained in:
tronikos 2024-05-27 17:30:34 -07:00 committed by GitHub
parent 33ff84469a
commit f2d0512f39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,7 +99,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
intent.INTENT_TOGGLE, intent.INTENT_TOGGLE,
HA_DOMAIN, HA_DOMAIN,
SERVICE_TOGGLE, SERVICE_TOGGLE,
"Toggles a device or entity", description="Toggles a device or entity",
), ),
) )
intent.async_register( intent.async_register(
@ -344,8 +344,6 @@ class NevermindIntentHandler(intent.IntentHandler):
class SetPositionIntentHandler(intent.DynamicServiceIntentHandler): class SetPositionIntentHandler(intent.DynamicServiceIntentHandler):
"""Intent handler for setting positions.""" """Intent handler for setting positions."""
description = "Sets the position of a device or entity"
def __init__(self) -> None: def __init__(self) -> None:
"""Create set position handler.""" """Create set position handler."""
super().__init__( super().__init__(
@ -353,6 +351,7 @@ class SetPositionIntentHandler(intent.DynamicServiceIntentHandler):
required_slots={ required_slots={
ATTR_POSITION: vol.All(vol.Coerce(int), vol.Range(min=0, max=100)) ATTR_POSITION: vol.All(vol.Coerce(int), vol.Range(min=0, max=100))
}, },
description="Sets the position of a device or entity",
) )
def get_domain_and_service( def get_domain_and_service(