08-26-2023, 05:36 AM
(This post was last modified: 08-26-2023, 05:39 AM by engmohades.)
I have performed the same settings as in the link you provided websit ,
https://www.kincony.com/d16-dimmer-integ...-mqtt.html
but it is giving me an "Unknown" and I am unable to control it through Home Assistant.
12345 post password used in page web off KC868-D16
----------------------------------
mqtt:
light:
- name: D16-1
unique_id: D16-1
schema: template
command_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/set"
state_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/state"
command_on_template: >
{%- if brightness is defined -%}
,{"dimmer1":{"value":{{(brightness / 255 * 100) | int - 1}}}
{%- else -%}
,'{"dimmer1":{"value":99}}'
{%- endif -%}
command_off_template: '{"dimmer1":{"value":0}}'
state_template: >
{%- if value_json.dimmer1.value == 0 -%}
off
{%- else -%}
on
{%- endif -%}
brightness_template: '{{(value_json.dimmer1.value / 99 * 255)| int}}'
- name: D16-2
unique_id: D16-2
schema: template
command_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/set"
state_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/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}}'
state_template: >
{%- if value_json.dimmer2.value == 0 -%}
off
{%- else -%}
on
{%- endif -%}
brightness_template: '{{(value_json.dimmer2.value / 99 * 255)| int}}'
Can you please fix this issue or provide me with the configuration file? I have three KC868-D16 devices, and I want to use them with Home Assistant.
https://www.kincony.com/d16-dimmer-integ...-mqtt.html
but it is giving me an "Unknown" and I am unable to control it through Home Assistant.
12345 post password used in page web off KC868-D16
----------------------------------
mqtt:
light:
- name: D16-1
unique_id: D16-1
schema: template
command_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/set"
state_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/state"
command_on_template: >
{%- if brightness is defined -%}
,{"dimmer1":{"value":{{(brightness / 255 * 100) | int - 1}}}
{%- else -%}
,'{"dimmer1":{"value":99}}'
{%- endif -%}
command_off_template: '{"dimmer1":{"value":0}}'
state_template: >
{%- if value_json.dimmer1.value == 0 -%}
off
{%- else -%}
on
{%- endif -%}
brightness_template: '{{(value_json.dimmer1.value / 99 * 255)| int}}'
- name: D16-2
unique_id: D16-2
schema: template
command_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/set"
state_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/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}}'
state_template: >
{%- if value_json.dimmer2.value == 0 -%}
off
{%- else -%}
on
{%- endif -%}
brightness_template: '{{(value_json.dimmer2.value / 99 * 255)| int}}'
Can you please fix this issue or provide me with the configuration file? I have three KC868-D16 devices, and I want to use them with Home Assistant.