From 26d66df7c266096f0ebff3ed39886ce7453dc338 Mon Sep 17 00:00:00 2001 From: ams2990 Date: Sat, 7 Mar 2026 20:35:02 -0500 Subject: [PATCH] Update light.md to mention toggle support Also fix a missing block quote close. --- docs/core/entity/light.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/core/entity/light.md b/docs/core/entity/light.md index 04053440745..35d0eba92d7 100644 --- a/docs/core/entity/light.md +++ b/docs/core/entity/light.md @@ -157,6 +157,7 @@ class MyLightEntity(LightEntity): ... value_in_range = math.ceil(brightness_to_value(BRIGHTNESS_SCALE, kwargs[ATTR_BRIGHTNESS])) +``` ::: @@ -170,3 +171,17 @@ class MyLightEntity(LightEntity): async def async_turn_off(self, **kwargs): """Turn device off.""" ``` + +### Toggle Light Device + +```python +class MyLightEntity(LightEntity): + async def async_toggle(self, **kwargs): + """Toggle the entity.""" +``` + +:::tip No sync `toggle` + +Unlike `turn_on`/`turn_off`, there is no support for synchronously toggling a light. + +:::