Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions homeassistant/components/light/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@
ATTR_FLASH: vol.In([FLASH_SHORT, FLASH_LONG]),
})

LIGHT_TOGGLE_SCHEMA = vol.Schema({
ATTR_ENTITY_ID: cv.comp_entity_ids,
ATTR_TRANSITION: VALID_TRANSITION,
})
LIGHT_TOGGLE_SCHEMA = LIGHT_TURN_ON_SCHEMA
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a second look, do all attributes of LIGHT_TURN_ON_SCHEMA make sense ? Shouldn't it be a subset ?

Copy link
Copy Markdown
Contributor Author

@zewelor zewelor Mar 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under the hood it calls turn_on, so I think everything that is accepted by turn_on could be passed there https://github.com/home-assistant/home-assistant/blob/519315f9c82ba9f0ea0bdcc622b4952b1c0a605c/homeassistant/helpers/entity.py#L470


PROFILE_SCHEMA = vol.Schema(
vol.ExactSequence((str, cv.small_float, cv.small_float, cv.byte))
Expand Down
8 changes: 2 additions & 6 deletions homeassistant/components/light/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,8 @@ turn_off:
toggle:
description: Toggles a light.
fields:
entity_id:
description: Name(s) of entities to toggle.
example: 'light.kitchen'
transition:
description: Duration in seconds it takes to get to next state.
example: 60
'...':
description: All turn_on parameters can be used.

hue_activate_scene:
description: Activate a hue scene stored in the hue hub.
Expand Down