eaad0b08cbfa361b2f1a6e887c29a70f380ea4a9
Light Preset Manager
Home Assistant custom integration with its Lovelace card: control a group of lights (on/off, brightness, colour temperature) and save up to four presets of their states, recalled with one tap. Home Assistant 2024.7.0 or later.
Installation
- Download
light_preset_manager-X.Y.Z.zipfrom the project page on a2msystemes.org. - Unzip it into
config/custom_components/light_preset_manager/of your Home Assistant installation. - Add this line to
configuration.yaml, then restart Home Assistant:light_preset_manager:
The card is loaded automatically by the integration (no Lovelace resource to add).
Card
type: custom:light-preset-manager
card_id: living_room # required: unique identifier, presets are stored under it
group: light.living_room # required: group or light controlled by the main buttons
title: Living room # optional
lights: # optional: individual lights saved in presets
- light.lamp_1
- light.lamp_2
presets: 4 # optional: number of presets (1 to 4)
The card also has a visual editor.
Actions
light_preset_manager.save_preset, recall_preset, rename_preset, get_presets (see Developer tools > Actions).
Blueprint
Blueprints/Stybarr-groups.yaml: control a group of lights with an IKEA STYRBAR remote.
Development
- Home Assistant in Docker:
docker compose up -d(VS Code task Dev: Start All), then http://localhost:8123. The integration is mounted fromcustom_components/; restart Home Assistant after a Python change. - Card:
npm installthennpm run watchinfrontend/; the built file goes tocustom_components/light_preset_manager/frontend/(committed). - Release file:
python scripts/package.py→dist/light_preset_manager-X.Y.Z.zip(version frommanifest.json).
License
MIT, see the LICENSE file.