---
title: "get lights that are on · RUAL Documentation"
description: "Returns every light currently switched on."
canonical: https://docs.rual.nl/block-types/globals/homeassist_lights_on
language: en
---

[Cluster](https://docs.rual.nl/cluster)

[Blocks](https://docs.rual.nl/block-types)

[Interfaces](https://docs.rual.nl/interfaces)

[Blueprints](https://docs.rual.nl/blueprints)

[Tutorials](https://docs.rual.nl/tutorials)

[Home automation](https://docs.rual.nl/home-automation)

[Examples](https://docs.rual.nl/examples)

[Reference](https://docs.rual.nl/reference)

[Architecture](https://docs.rual.nl/architecture)

[Troubleshooting](https://docs.rual.nl/troubleshooting)

Other

# get lights that are on

This block is part of the [`globals`](https://docs.rual.nl/block-types/globals) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Returns every light currently switched on.

- flow `v15.0.0` `flow`

- room `v15.0.0` `value`

- flow `v15.0.0` `flow`

- devices `v15.0.0` `array`

- count `v15.0.0` `number`

Reads the registry for adopted devices of type light whose power state is known AND true. Lights whose state is unknown are excluded : see get active sensors for the same reasoning. Pair with array_map + light off for a 'everything off' flow.

| `zigbee` |
| --- |
| `zwave` |
| `matter` |
| `thread` |
| `hue` |
| `smart home` |

[get lights that are on](https://docs.rual.nl/block-types/home/homeassist_lights_on) reads the in-memory device registry, so it makes no network call and is cheap enough to run in a loop. It returns only lights whose power state is KNOWN and true: a lamp the node has not heard from since it started is left out rather than assumed off. The count pin feeds [>](https://docs.rual.nl/block-types/condition/condition_gt) and [branch](https://docs.rual.nl/block-types/flow/branch), which is the shape of "if anything is still on, do something about it".

[![Studio canvas example for the get lights that are on block: asking the registry which lights are on.](https://docs.rual.nl/canvas-examples/homeassist_lights_on.png)](https://docs.rual.nl/canvas-examples/homeassist_lights_on.png?v=3)

## Used in these guides

These documentation pages use or explain this block:

- [Action Reference](https://docs.rual.nl/home-automation/actions)

## Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

- [Back to `globals`](https://docs.rual.nl/block-types/globals): Return to the main group to view all sub-groups

- [Back to `home`](https://docs.rual.nl/block-types/globals?group=home): Return to the group to view all blocks within this group

Was this page helpful? [Tell us what to improve](https://docs.rual.nl/support) · RUAL Docs is an integral component of the [RUAL ecosystem](https://rual.nl)
