witno
(Ivar)
April 4, 2022, 12:38pm
1
Hi!
My HASS controled system is off grid, with powesupply from a rather well sized LiFePO 48V batterybank, convertet down to 12V DC pure sinus. Can allso deliver 230VAC. However all of the lights are on the 12V circuit. I have several dimmers zigbee (ZHA) and Z-Wave (Z-Wave JS).
I the hallway there are 4 individual GU10 12V Ledspots (dimmable). I have tried two different drivers, a Namron Zigbee LED controller and a Gledopto GL-C 009 .
The both a reported to support dimming, however, both using the light button in HA and throgh the remote switch, the dimming effect is only noticable from between 1-6% for the remaining 7-100% the lights seems to be at full brightness.
Any ideas on how to approach this. Is there any config-files, custom quirks or hidden setting to manipulate?
Thanks for any leads or support.
lolouk44
(lolouk44)
April 4, 2022, 1:49pm
2
If you can’t fix the integration, you could always look at creating template lights with a template dividing the light brightness by ~17
witno
(Ivar)
April 4, 2022, 6:25pm
3
Thanks for you advice, @lolouk44 !
As a total newbee to templateing, could you please point me in the right direction on how to alter this, copied from the link provided, and added the entity id of the dimmer. Assuming the entity ID is: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
# Example configuration.yaml entry
light:
- platform: template
lights:
light.gledopto_gl_c_009_c7747222_level_light_color_on_off:
friendly_name: "Hallway lights"
level_template: "{{ state_attr('sensor.gledopto_gl_c_009_c7747222_level_light_color_on_off', 'lux')|int }}"
value_template: "{{ state_attr('sensor.theater_brightness', 'lux')|int > 0 }}"
temperature_template: "{{states('input_number.temperature_input') | int}}"
color_template: "({{states('input_number.h_input') | int}}, {{states('input_number.s_input') | int}})"
effect_list_template: "{{ state_attr('light.led_strip', 'effect_list') }}"
turn_on:
service: script.light.gledopto_gl_c_009_c7747222_level_light_color_on_off
turn_off:
service: script.light.gledopto_gl_c_009_c7747222_level_light_color_on_off
set_level:
service: script.light.gledopto_gl_c_009_c7747222_level_light_color_on_off_level
data:
brightness: "{{ brightness/17 }}"
set_temperature:
service: input_number.set_value
data:
value: "{{ color_temp }}"
entity_id: input_number.temperature_input
set_white_value:
service: input_number.set_value
data:
value: "{{ white_value }}"
entity_id: input_number.white_value_input
set_color:
- service: input_number.set_value
data:
value: "{{ h }}"
entity_id: input_number.h_input
- service: input_number.set_value
data:
value: "{{ s }}"
entity_id: input_number.s_input
- service: light.turn_on
data_template:
entity_id:
- light.gledopto_gl_c_009_c7747222_level_light_color_on_off
transition: "{{ transition | float }}"
hs_color:
- "{{ hs[0] }}"
- "{{ hs[1] }}"
set_effect:
- service: light.turn_on
data_template:
entity_id:
- light.gledopto_gl_c_009_c7747222_level_light_color_on_off
effect: "{{ effect }}"
supports_transition_template: "{{ true }}"
In this case it is a question of adjusting the brightness. Should / can the parts of the scrip refering to white_value and color_template be excluded.
Sould the etity_id only be in the:
data_template:
entity_id:
- light.gledopto_gl_c_009_c7747222_level_light_color_on_off
… part of the script?
Keep in mind that it is not a ledstrip but 4 GU10 LED bulbs.
Thanks!
lolouk44
(lolouk44)
April 4, 2022, 9:52pm
4
not sure about your setup /config but it would be something along these lines (totally untested):
light:
- platform: template
lights:
templated_light_name:
friendly_name: "Templated Light Name"
level_template: "{{ state_attr('light.gledopto_gl_c_009_c7747222_level_light_color_on_off', 'brightness')|int }}"
value_template: >-
{% if is_state('light.gledopto_gl_c_009_c7747222_level_light_color_on_off', 'on') %}
on
{% else %}
off
{% endif %}
turn_on:
service: light.turn_on
target:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
turn_off:
service: light.turn_off
target:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
set_level:
service: light.turn_on
target:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
data:
brightness: "{{ brightness | int / 17}}"
witno
(Ivar)
April 6, 2022, 8:45pm
5
lolouk44:
light:
- platform: template
lights:
templated_light_name:
friendly_name: "Templated Light Name"
level_template: "{{ state_attr('light.gledopto_gl_c_009_c7747222_level_light_color_on_off', 'brightness')|int }}"
value_template: >-
{% if is_state('light.gledopto_gl_c_009_c7747222_level_light_color_on_off', 'on') %}
on
{% else %}
off
{% endif %}
turn_on:
service: light.turn_on
target:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
turn_off:
service: light.turn_off
target:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
set_level:
service: light.turn_on
target:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
data:
brightness: "{{ brightness | int / 17}}"
Thank you so much!
Did try the template, but no light at all. Just a low pulsating beep from the LED-controller / dimmer.
Will try divide lowe, by 3 or less to se if it makes any difference:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
set_level:
service: light.turn_on
target:
entity_id: light.gledopto_gl_c_009_c7747222_level_light_color_on_off
data:
brightness: "{{ brightness | int / 3}}"
witno
(Ivar)
April 6, 2022, 8:54pm
6
Doesent seem to work as I had hoped for. The divider is set to 8.
This what I get trying to regonfigure in ZHA after appying the template…