Light: add section on states (#34573)

This commit is contained in:
c0ffeeca7 2024-09-04 15:22:46 +02:00 committed by GitHub
parent ed0c871f4e
commit c510bdb496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 4 deletions

View File

@ -15,7 +15,16 @@ This integration allows you to track and control various light bulbs. Read the i
{% include integrations/building_block_integration.md %}
### Default turn-on values
## State and attributes of a light entity
Light {% term entities %} can have the following {% term states %}: `on` or `off`. The list of available attributes depends on the {% term device %}. Refer to the integration documentation of your light.
<p class='img'>
<img src='/images/integrations/light/state_light.png' alt='Screenshot showing three lights with differents states: `on`, `off`, or `unavailable`'>
Three lights with differents states: `on`, `off`, or `unavailable`.
</p>
## Default turn-on values
To set the default color, brightness and transition values when the light is turned on, create a custom `light_profiles.csv`, normally located in the default configuration folder where you find {% term "`configuration.yaml`" %}.
@ -33,7 +42,7 @@ The `.default` suffix should be added to the entity identifier of each light to
If a light entity is in the `on` state, the default profile brightness will only be applied if it is called in the action data attribute `profile`, like any other named profile. The transition attribute will be applied for all `light.turn_on`, `light.toggle`, and `light.turn_off` actions, unless specified otherwise in the action data.
{% endnote %}
### Action `light.turn_on`
## Action `light.turn_on`
Turns one light on or multiple lights on using [groups](/integrations/group/).
@ -101,7 +110,7 @@ automation:
If no data is sent, and a default profile exists, the default profile will be applied.
{% endnote %}
### Action `light.turn_off`
## Action `light.turn_off`
Turns one or multiple lights off.
@ -111,7 +120,7 @@ Turns one or multiple lights off.
| `transition` | yes | Integer that represents the time the light should take to transition to the new state in seconds. |
| `flash` | yes | Tell light to flash, can be either value `short` or `long`. |
### Action `light.toggle`
## Action `light.toggle`
Toggles the state of one or multiple lights. Takes the same arguments as the [`light.turn_on`](#action-lightturn_on) action.

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB