Skip to content

Commit

Permalink
Make sure HassToggle and HassSetPosition have description (home-assis…
Browse files Browse the repository at this point in the history
  • Loading branch information
tronikos authored May 28, 2024
1 parent 33ff844 commit f2d0512
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions homeassistant/components/intent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
intent.INTENT_TOGGLE,
HA_DOMAIN,
SERVICE_TOGGLE,
"Toggles a device or entity",
description="Toggles a device or entity",
),
)
intent.async_register(
Expand Down Expand Up @@ -344,15 +344,14 @@ async def async_handle(self, intent_obj: intent.Intent) -> intent.IntentResponse
class SetPositionIntentHandler(intent.DynamicServiceIntentHandler):
"""Intent handler for setting positions."""

description = "Sets the position of a device or entity"

def __init__(self) -> None:
"""Create set position handler."""
super().__init__(
intent.INTENT_SET_POSITION,
required_slots={
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(
Expand Down

0 comments on commit f2d0512

Please sign in to comment.