Hey everyone! I wanted to share my recent success with integrating my Hue lights into the Lovelace UI. I’ve been experimenting with custom cards to make my lighting controls more intuitive. My goal was to have a card that lists my lights with an on/off slider, and when the light is turned on, it automatically switches to a specific Hue scene.
Initially, I tried using the glance card, but I really preferred the on/off slider functionality. However, I ran into an issue where the scene wouldn’t trigger when using the entities card. After some research and tweaking, I found a solution that works perfectly! Here’s what I did:
- Identify the Hue Scene: I made sure the scene I wanted was properly configured in my Hue setup.
- Modify the Entities Card: I adjusted the entities card to include the scene activation within the tap action. The key was ensuring the service and data were correctly specified.
- Test and Refine: I tested the setup multiple times, adjusting the code as needed to ensure smooth operation.
Here’s the code that worked for me:
yaml
type: entities
entities:
- entity: light.hall
name: Hall
tap_action:
action: call-service
service: hue.hue_activate_scene
service_data:
group_name: Living Room
scene_name: Bright
I’m thrilled with how this turned out! It’s now much easier to control my lights with a simple toggle, and the scene transitions are seamless. If anyone has questions or needs help setting this up, feel free to ask! Happy automating everyone! ![]()