Hi, I want to dim my hue lamp, but I don’t want it to power off. How can I do that? I use a hue dimmer.
Here is my code. I think I need a condition like “brightness higher than 10” or so but don’t know how to do that.
- id: '1583087961168'
alias: Licht EG Flur DUNKLER schnell
description: ''
trigger:
- device_id: b42687e63523499ca5b47c9d5142f50c
domain: deconz
platform: device
subtype: dim_down
type: remote_button_long_press
condition: []
action:
- device_id: dc0b66f453714c4f9335ba568c1624f9
domain: light
entity_id: light.eg_flur_1
type: brightness_decrease
- device_id: 0c6fc392c2944669b6154b98a341f33c
domain: light
entity_id: light.eg_flur_2
type: brightness_decrease
Thanks,
Jaques-Ludwig
This one I use. single tap on dim - about 10% each tap
automation:
- alias: 'Increase brightness of lamp from dimmer'
initial_state: 'on'
trigger:
platform: event
event_type: deconz_event
event_data:
id: philips_switch_stue_conbee
event: 2002
action:
- service: light.turn_off
entity_id:
- light.lys_ventilator
- service: switch.turn_off
data:
entity_id:
- switch.circadian_lighting_downlight_stue
- switch.circadian_lighting_taklampe_kjokken
- switch.circadian_lighting_bordlampe_spisebord
- switch.circadian_lighting_taklampe_gang
- switch.circadian_lighting_ledlys_trapp
- switch.flux_warm_white
- service: light.turn_on
data_template:
entity_id: light.dimmer_fjernkontroll_fellesrom
brightness: >
{% set bri = state_attr('light.dimmer_fjernkontroll_fellesrom', 'brightness') | int %}
{{ [bri+30, 249] | min }} ```
Thanks for your answer. But I am a beginner and I don’t understand more than a half of that code.
Is there an easier way for my problem? Or is there a homepage where I can read how it works?
Thanks
123
(Taras)
March 2, 2020, 1:32pm
4
Try this:
- id: '1583087961168'
alias: Licht EG Flur DUNKLER schnell
description: ''
trigger:
- device_id: b42687e63523499ca5b47c9d5142f50c
domain: deconz
platform: device
subtype: dim_down
type: remote_button_long_press
condition:
condition: template
value_template: >
{{ state_attr('light.eg_flur_1', 'brightness') | int >= 50 and
state_attr('light.eg_flur_2', 'brightness') | int >= 50 }}
action:
- device_id: dc0b66f453714c4f9335ba568c1624f9
domain: light
entity_id: light.eg_flur_1
type: brightness_decrease
- device_id: 0c6fc392c2944669b6154b98a341f33c
domain: light
entity_id: light.eg_flur_2
type: brightness_decrease
A light’s brightness
is in the range of 0
to 255
so 10% brightness is approximately 25
.
I don’t know by how much brightness_decrease
will reduce a light’s brightness. I have made an assumption that is is by 10% (a change of 25
).
The condition checks the brightness
of both lights. Each one’s brightness
must be greater than or equal to 50
to allow dimming.
You may need to experiment and change 50
to a value that works best for you.
2 Likes
@123
Thanks, that was it. All works like a charm now.
Thank you very much! One problem less.
1 Like
123
(Taras)
March 2, 2020, 5:23pm
6
Glad to hear it worked for you.
For the benefit of other community members, please mark my post with the Solution tag. Only you, the author of this topic, can do that. It will automatically place a check-mark next to the topic’s title. It signals to other users that this topic has an accepted Solution. In addition, it will automatically place a link below your first post that leads to the Solution. All of this helps other users who may be searching for answers to a similar question.