01-20-2026, 09:19 PM
Thanks for your reply.
The Server is in 192.168.2.2/24 and D16 is 192.168.2.56/24
The config.yaml is:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
light:
- name: D16-1
unique_id: D16-1
schema: template
command_topic: "dimmer/fd9ab0f2672e6427e0701ea6/set"
state_topic: "dimmer/fd9ab0f2672e6427e0701ea6/state"
command_on_template: >
{%- if brightness is defined -%}
{"dimmer1":{"value":{{ (brightness / 255 * 99) | int }}}
{%- 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: >
{%- if value_json.dimmer1.value is defined -%}
{{ (value_json.dimmer1.value / 99 * 255) | int }}
{%- else -%}
0
{%- endif -%}
- name: D16-2
unique_id: D16-2
schema: template
command_topic: "dimmer/fd9ab0f2672e6427e0701ea6/set"
state_topic: "dimmer/fd9ab0f2672e6427e0701ea6/state"
command_on_template: >
{%- if brightness is defined -%}
{"dimmer2":{"value":{{ (brightness / 255 * 99) | int }}}
{%- 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: >
{%- if value_json.dimmer2.value is defined -%}
{{ (value_json.dimmer2.value / 99 * 255) | int }}
{%- else -%}
0
{%- endif -%}
The Server is in 192.168.2.2/24 and D16 is 192.168.2.56/24
The config.yaml is:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
light:
- name: D16-1
unique_id: D16-1
schema: template
command_topic: "dimmer/fd9ab0f2672e6427e0701ea6/set"
state_topic: "dimmer/fd9ab0f2672e6427e0701ea6/state"
command_on_template: >
{%- if brightness is defined -%}
{"dimmer1":{"value":{{ (brightness / 255 * 99) | int }}}
{%- 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: >
{%- if value_json.dimmer1.value is defined -%}
{{ (value_json.dimmer1.value / 99 * 255) | int }}
{%- else -%}
0
{%- endif -%}
- name: D16-2
unique_id: D16-2
schema: template
command_topic: "dimmer/fd9ab0f2672e6427e0701ea6/set"
state_topic: "dimmer/fd9ab0f2672e6427e0701ea6/state"
command_on_template: >
{%- if brightness is defined -%}
{"dimmer2":{"value":{{ (brightness / 255 * 99) | int }}}
{%- 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: >
{%- if value_json.dimmer2.value is defined -%}
{{ (value_json.dimmer2.value / 99 * 255) | int }}
{%- else -%}
0
{%- endif -%}

