Add selectors to Fan service definitions (#46639)

This commit is contained in:
Franck Nijhof 2021-02-18 12:24:58 +01:00 committed by GitHub
parent 4e93a0c774
commit 2dfbd4fbcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,80 +1,102 @@
# Describes the format for available fan services # Describes the format for available fan services
set_speed: set_speed:
description: Sets fan speed. description: Set fan speed
target:
fields: fields:
entity_id:
description: Name(s) of the entities to set
example: "fan.living_room"
speed: speed:
description: Speed setting name: Speed
description: Speed setting.
required: true
example: "low" example: "low"
selector:
text:
set_preset_mode: set_preset_mode:
description: Set preset mode for a fan device. description: Set preset mode for a fan device
target:
fields: fields:
entity_id:
description: Name(s) of entities to change.
example: "fan.kitchen"
preset_mode: preset_mode:
description: New value of preset mode name: Preset mode
description: New value of preset mode.
required: true
example: "auto" example: "auto"
selector:
text:
set_percentage: set_percentage:
description: Sets fan speed percentage. description: Set fan speed percentage
target:
fields: fields:
entity_id:
description: Name(s) of the entities to set
example: "fan.living_room"
percentage: percentage:
description: Percentage speed setting name: Percentage
description: Percentage speed setting.
required: true
example: 25 example: 25
selector:
number:
min: 0
max: 100
step: 1
unit_of_measurement: "%"
mode: slider
turn_on: turn_on:
description: Turns fan on. description: Turn fan on
target:
fields: fields:
entity_id:
description: Names(s) of the entities to turn on
example: "fan.living_room"
speed: speed:
description: Speed setting name: Speed
description: Speed setting.
example: "high" example: "high"
percentage: percentage:
description: Percentage speed setting name: Percentage
description: Percentage speed setting.
example: 75 example: 75
selector:
number:
min: 0
max: 100
step: 1
unit_of_measurement: "%"
mode: slider
preset_mode: preset_mode:
description: Preset mode setting name: Preset mode
description: Preset mode setting.
example: "auto" example: "auto"
selector:
text:
turn_off: turn_off:
description: Turns fan off. description: Turn fan off
fields: target:
entity_id:
description: Names(s) of the entities to turn off
example: "fan.living_room"
oscillate: oscillate:
description: Oscillates the fan. description: Oscillate the fan
target:
fields: fields:
entity_id:
description: Name(s) of the entities to oscillate
example: "fan.desk_fan"
oscillating: oscillating:
description: Flag to turn on/off oscillation name: Oscillating
description: Flag to turn on/off oscillation.
required: true
example: true example: true
selector:
boolean:
toggle: toggle:
description: Toggle the fan on/off. description: Toggle the fan on/off
fields: target:
entity_id:
description: Name(s) of the entities to toggle
example: "fan.living_room"
set_direction: set_direction:
description: Set the fan rotation. description: Set the fan rotation
target:
fields: fields:
entity_id:
description: Name(s) of the entities to set
example: "fan.living_room"
direction: direction:
description: The direction to rotate. Either 'forward' or 'reverse' name: Direction
description: The direction to rotate.
required: true
example: "forward" example: "forward"
selector:
select:
options:
- "forward"
- "reverse"