diff --git a/docs/documents/api/device-types/ha-light.html b/docs/documents/api/device-types/ha-light.html index 9369dc5c..a9f4f5de 100644 --- a/docs/documents/api/device-types/ha-light.html +++ b/docs/documents/api/device-types/ha-light.html @@ -154,7 +154,7 @@
HALight allows adding a controllable light in the Home Assistant panel. The library supports only the state, brightness, color temperature and RGB color. If you need more features please open a new GitHub issue.
+HALight allows adding a controllable light in the Home Assistant panel. The library supports only the state, brightness, color temperature, RGB color and effects. If you need more features please open a new GitHub issue.
Note
You can find more information about this entity in the Home Assistant documentation: https://www.home-assistant.io/integrations/light.mqtt/
@@ -185,6 +185,11 @@Sets the list of available effects that will be listed. For example: const char* const lightEffects[] = {"Fire","Rainbow","Snowflales","Rain","Smoke"}; light.setEffects(lightEffects, 5);
Note
+The effects list can be set only once.
+effects – The list of effects i.e. array of strings.
size – The size of the effects list i.e. total number of effects.
Changes the effect of the light and publishes MQTT message. Effect represents the index of the effect that was set using setEffects method. Please note that if a new value is the same as previous one, the MQTT message won’t be published.
+effect – The new effect index of the light.
force – Forces to update the value without comparing it to a previous known value.
Returns true
if the effect is set successfully.
Sets the current effect of the light without pushing the value to Home Assistant. This method may be useful if you want to change the effect before the connection with the MQTT broker is acquired.
+effect – The new effect.
+Returns the last known effect of the light. Effect represents the index of the effect that was set using setEffects method. By default the effect is set to 0
.
Registers callback that will be called each time the effect command from HA is received. Please note that it’s not possible to register multiple callbacks for the same light.
+Note
+In non-optimistic mode, the effect must be reported back to HA using the HALight::setEffect method.
+callback –
+Public Static Attributes
@@ -562,6 +639,20 @@Publishes the MQTT message with the given effect.
+effect – The effect to publish.
+Returns true
if the MQTT message has been published successfully.
Parses the given effect command and executes the callback with proper value.
+cmd – The data of the command.
length – Length of the command.
Private Members
@@ -687,6 +792,18 @@Array of effects for the serializer.
+The current effect (the current effect’s index). By default it’s 0
.
The callback that will be called when the effect is received from the HA.
+