hass-core/homeassistant/components/switch/services.yaml

90 lines
2.5 KiB
YAML

# Describes the format for available switch services
turn_on:
description: Turn a switch on.
fields:
entity_id:
description: Name(s) of entities to turn on
example: 'switch.living_room'
turn_off:
description: Turn a switch off.
fields:
entity_id:
description: Name(s) of entities to turn off.
example: 'switch.living_room'
toggle:
description: Toggles a switch state.
fields:
entity_id:
description: Name(s) of entities to toggle.
example: 'switch.living_room'
save_state:
description: Saves a state of the entity.
fields:
entity_id:
description: Name(s) of entities to save state of.
example: 'switch.attic'
rewrite:
description: Should it rewrite already saved state fo the entity (default False).
example: True
restore_state:
description: Restores a state of the entity.
fields:
entity_id:
description: Name(s) of entities to restore state of.
example: 'switch.attic'
delay:
description: Time period before restore.
example: "5, '0:05', {'minutes': 5}"
cancel_restore_state:
description: Cancels scheduled state restore of the entity.
fields:
entity_id:
description: Name(s) of entities to cancel restoring state of.
example: 'switch.attic'
mysensors_send_ir_code:
description: Set an IR code as a state attribute for a MySensors IR device switch and turn the switch on.
fields:
entity_id:
description: Name(s) of entities that should have the IR code set and be turned on. Platform dependent.
example: 'switch.living_room_1_1'
V_IR_SEND:
description: IR code to send.
example: '0xC284'
xiaomi_miio_set_wifi_led_on:
description: Turn the wifi led on.
fields:
entity_id:
description: Name of the xiaomi miio entity.
example: 'switch.xiaomi_miio_device'
xiaomi_miio_set_wifi_led_off:
description: Turn the wifi led off.
fields:
entity_id:
description: Name of the xiaomi miio entity.
example: 'switch.xiaomi_miio_device'
xiaomi_miio_set_power_price:
description: Set the power price.
fields:
entity_id:
description: Name of the xiaomi miio entity.
example: 'switch.xiaomi_miio_device'
mode:
description: Power price, between 0 and 999.
example: 31
xiaomi_miio_set_power_mode:
description: Set the power mode.
fields:
entity_id:
description: Name of the xiaomi miio entity.
example: 'switch.xiaomi_miio_device'
mode:
description: Power mode, valid values are 'normal' and 'green'.
example: 'green'