LightScene is a custom Home Assistant integration that enhances your lighting control by managing scenes with dynamic brightness scaling and context tracking. Enable brightness scaling and context tracking for Home Assistant scene entities, allowing dynamic control over lighting environments in your smart home.
This component introduces sceneoff functionality and proportional brightness control for lights defined in your Home Assistant scene.
- Automatic discovery: Automatically detects scenes and creates a corresponding
lightentity for every Home Assistant scene. - Scene state tracking: Listens for
sceneactivation events to turn on LightScene entities. Tracks scene entity changes to determine if scene has been turned off. - Togglable: Regular scenes only support being turned on. LightScene lights can be turned on or off.
- Proportional brightness control: Scale brightness of all
scenelights in proportion toscenepresets.
No manual configuration is needed. The component automatically discovers scene entities and creates corresponding LightScene entities.
For example, a scene named Evening Lights with several lights with brightness controls will automatically have a LightScene light entity created with brightness scaling enabled.
Light scenes can be turned on via the Home Assistant UI or through a service call, as usual:
service: light.turn_on
data:
entity_id: light.evening_lights
brightness: 150Turn off the light scene with:
service: light.turn_off
data:
entity_id: light.evening_lightsThe component scales brightness based on the baseline brightness of the scene. For example:
- A light with brightness 255 in the scene will scale proportionally to match the specified brightness.
- Scene reload: Automatically updates all
LightSceneentities when scenes are reloaded. - Scene activation: Handles external activations of scenes and updates the corresponding
LightSceneentity.
To enable debug logging for this component, add the following to your configuration.yaml:
logger:
default: warning
logs:
custom_components.lightscene: debugOr manually add the custom repository:
Step-by-step HACS installation
- Open HACS in your Home Assistant dashboard
- Click the ⋮ menu (top right) → Custom repositories
- Add this URL and set the category to Integration, then click Add:
https://github.com/markfrancisonly/ha-lightscene - The repository now appears in the custom repositories list. Close the dialog.
- Back in HACS, search for Video Call and open the result
- Click Download (or Install) and confirm
- Restart Home Assistant
- Download the latest release
- Copy the contents into
custom_components/ha-lightscene/inside your HA config directory - Restart Home Assistant