Hi, please can someone advise why I am not able to use the dimming functionality in lovelace with this yaml? The light switches on and off fine but won’t dim.
mqtt:
light:
- name: "Office_inner"
schema: template
state_topic: "shellies/shellydimmer2-[deviceID]/light/0/status"
state_template: "{% if value_json.ison %} on {% else %} off {% endif %}"
command_topic: "shellies/shellydimmer2-[deviceID]/light/0/set"
command_on_template: >
{"turn": "on"
{%- if brightness is defined -%}
, "brightness": {{brightness | float | multiply(0.3882) + 1 | round(0)}}
{%- endif -%}}
command_off_template: '{"turn": "off"}'
brightness_template: "{{ value_json.brightness | float | multiply(2.55) | round(0) }}"