05-07-2024, 05:36 PM
(03-12-2024, 02:06 AM)admin Wrote: ok, no problem, just post at here.
Hi Kincony, I'm working with KC868-D16, 12V PowerSupply and 12V 7W dimmer lamp.
I'm using this config:
- name: dimmer-2
unique_id: dimmer-2
schema: template
command_topic: 'dimmer/28e5d2df6311b55XXXXXXXXX/set'
state_topic: 'dimmer/28e5d2df6311b55XXXXXXXXXX/state'
command_on_template: >
{%- if brightness is defined -%}
,{"dimmer2":{"value":{{(brightness / 255 * 100) | int - 1}}}
{%- else -%}
,'{"dimmer2":{"value":99}}'
{%- endif -%}
command_off_template: '{"dimmer2":{"value":0}}'
What I notice is that light only changes from 0 to 20% then it's all the same as if it is at 100%.
How to fix this?