@asa79 inside your config folder, same place as your configuration.yaml
and lovelace.yaml
files.
(updated main post with this info as well)
@asa79 inside your config folder, same place as your configuration.yaml
and lovelace.yaml
files.
(updated main post with this info as well)
Thanks Thomas, I am pretty good with reading the docs, and I think this did need clarifying
Is it possible to use white_value
in the profile? I have RGBW lights, if i don’t set any white value it just turns the white leds off.
Hey folks,
I just started setting up this card together with a IKEA LED1623G12 ZigBee bulb. Just brightness choice possible, no RGB, no temperature.
The setup works in general, but…
neither the color highlighting of the current profile works, nor is the switch shown - although it’s clickable and controls the bulb.
Anyone any ideas?
I’ve set up the following:
../config/light_profiles.csv
id,x,y,brightness
bright,0.457,0.408,254
background,0.457,0.408,150
dimmed,0.457,0.408,77
../config/ui-lovelace.yaml
resources:
- type: module
url: /local/custom-lovelace/light-with-profiles.js
light_profiles:
bright: '0.457,0.408,254'
background: '0.457,0.408,150'
dimmed: '0.457,0.408,77'
- title: Arbeitszimmer
path: arbeitszimmer
icon: mdi:desk-lamp
cards:
- type: 'custom:light-with-profiles'
title: Licht
entities:
- entity: light.0x000b57fffe143462_light
profiles:
- name: bright
icon: 'mdi:brightness-5'
- name: background
icon: 'mdi:brightness-4'
- name: dimmed
icon: 'mdi:brightness-3'
Hey @mcg
I actually had this little issue myself. The card cant see what profile the light is using only the x,y,brightness value. It uses this to compare to the profiles you defined.
So how to solve this.
this should fix the issue. let me know how it goes
Hey @tcarlsen
thanks for this constructive reply! I checked it and found (obviously) the following: As I just have a withe light bulb there are no rgb-/xy-entries for the color in that particular entity. The brightness has the same value as noted in the profile, though.
Would this automatically mean that the profile highlighting just works with rgb- AND brightness-controllable lights (as all three values are being compared?)
every good question. and im not sure
As off I dont have ani lights without xy I really cant test this.
But what I will try to do is add a debug setting that then will show the value its checking up against
@mcg 2.1.0 is out. please go download and enable debug
type: 'custom:light-with-profiles'
title: Lys
debug: true
entities:
- entity: light.spisestuen
- entity: light.entreen
- entity: light.kokken
and tell me what values you get
Well, guess that result’s somehow what we expected
But my button is working now!
Any plans to get it added to HACS?
It is in hacs
Forgive me, I simply assumed (first mistake), that since it didn’t have the HACS default badge that it wasn’t in the HACs library. I should have looked before posting (second mistake). Thanks for the reply
@mcg please go and upgrade to 2.2.0 I hope I made it possible to make brightness only profiles by setting x,y to 0,0 like this:
light_profiles:
brightness_only: '0,0,150'
Thanks @tcarlsen, works like a charm now!
Just another question for my understanding:
Do I define the light profiles once in the ui-lovelace.yaml
to have them available in the card and once in the light_profiles.csv
to be compared against and make the highlighting possible? Or is there a slimmer way without the need of double documentation?
And maybe just another idea for future development after we now discussed lights with and without RGB: how about RGBW lights with the abilityto control the white temperatures? Or is this currently out of HA’s light profiles scope as there’s just RGB + brightness?
Thanks again and cheers!
you are defining the light_profiles.csv because its the native way to make and use light profiles in HA
you are defining the profiles you wanna use in the card so the card can compare the values to see which profile is active. Cards dont have access to config files like the light_profiles.csv, so there is no other way around this if you want the active profile to light up.
If you can live with not having the icons show the active profile you can just dont add them in ui-lovelace.yaml. the card will still work, just not show the active profile
hope the answers your question
Im not sure if the native light profiles in HA can use anything else then x,y,brightness
Hi,
In home assistant 0.106 there is not light_profiles.csv and lovelace.yaml.
Do we have to add them manually? Also do we have to enable lovelace.yaml mode in order to be able to customize it?
Yes you have to create the files. You always had to.
I do beleive you can do it without yaml mode
Done. But it is not working as expected.
When I choose a light profile, nothing changes. Neither dims, nor change colour. Also doesn’t show which profile is enabled. Just on-off option.
Light_profiles.csv (in config folder):
Relax,0.5119,0.4147,144
Concentrate,0.5119,0.4147,219
Reading,0.4448,0.4066,240
Energise,0.368,0.3686,203
group.all_lights.default,0.326,0.333,255
ui-lovelace.yaml (in config folder):
resources:
- type: module
url: /local/light-with-profiles.js
light_profiles:
bright: '0.5119,0.4147,254'
dimmed: '0.5119,0.4147,77'
nightlight: '0.363,0.3686,1'
brightness_only: '0,0,150'
title: Home
views:
- badges:
- entity: binary_sensor.updater
- entity: person.agma
- entity: sensor.illumination_44237c82f84a
- entity: sun.sun
cards:
- entities:
- entity: automation.toggle_bedroom_light
- entity: automation.toggle_kid_s_room_light
- entity: automation.turn_off_night_light
- entity: automation.night_mode
title: Automation
type: entities
- entity: weather.spiti
type: weather-forecast
- aspect_ratio: 50%
type: iframe
url: 'https://www.home-assistant.io'
- entities:
- entity: person.agma
- entity: device_tracker.eml_l29
type: map
- entities:
- entity: camera.bedroom
type: entities
icon: 'mdi:home'
path: default_view
title: Home
- badges: []
cards:
- entities:
- entity: light.bedroom
profiles:
- name: bright
icon: 'mdi:brightness-5'
- name: dimmed
icon: 'mdi:brightness-4'
- name: nightlight
icon: 'mdi:brightness-3'
- entity: light.kid's room
profiles:
- name: bright
icon: 'mdi:brightness-5'
- name: dimmed
icon: 'mdi:brightness-4'
- name: nightlight
icon: 'mdi:brightness-3'
title: Lights
type: 'custom:light-with-profiles'
icon: 'mdi:lightbulb-on'
path: lights
title: Lights
Looks like whatever xy color I change in light_profiles.csv, my bulbs are not recognized in HA. Accepts only stock values. Any thoughts?
I really like the look and functionality of this.
And with the brightness only update, I can get some info out from my IKEA lights also
Thank you for sharing.
You need to use the same profiles in the card as you have the profile.csv.
So you could add the profiles you use to the Light_profiles.csv (in config folder):
Relax,0.5119,0.4147,144
Concentrate,0.5119,0.4147,219
Reading,0.4448,0.4066,240
Energise,0.368,0.3686,203
bright,0.5119,0.4147,254
dimmed,0.5119,0.4147,77
nightlight,0.363,0.3686,1
group.all_lights.default,0.326,0.333,255
Now when you trigger the bright profile from the card, there is a bright profile in the csv config that can send that info to the light bulb.