Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###Test Light###
- - platform: mqtt
- schema: template
- name: Test Light WW
- command_topic: "shellies/shellyrgbw2-2B8361/white/0/set"
- state_topic: "shellies/shellyrgbw2-2B8361/white/0/status"
- command_on_template: >
- {"turn": "on"
- {%- if brightness is defined -%}
- , "brightness": {{brightness | float | multiply(0.3922) | round(0)}}
- {%- endif -%}
- }
- state_template: '{%- if value_json.ison %}on{% else %}off{% endif %}'
- brightness_template: '{{ value_json.brightness | float | multiply(2.55) | round(0) }}'
- command_off_template: '{"turn":"off"}'
- qos: 1
- - platform: mqtt
- schema: template
- name: Test Light CW
- command_topic: "shellies/shellyrgbw2-2B8361/white/1/set"
- state_topic: "shellies/shellyrgbw2-2B8361/white/1/status"
- command_on_template: >
- {"turn": "on"
- {%- if brightness is defined -%}
- , "brightness": {{brightness | float | multiply(0.3922) | round(0)}}
- {%- endif -%}
- }
- state_template: '{%- if value_json.ison %}on{% else %}off{% endif %}'
- brightness_template: '{{ value_json.brightness | float | multiply(2.55) | round(0) }}'
- command_off_template: '{"turn":"off"}'
- qos: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement