Advertisement
Guest User

Untitled

a guest
Jul 4th, 2019
1,243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.21 KB | None | 0 0
  1. ###Test Light###
  2.   - platform: mqtt
  3.     schema: template
  4.     name: Test Light WW
  5.     command_topic: "shellies/shellyrgbw2-2B8361/white/0/set"
  6.     state_topic: "shellies/shellyrgbw2-2B8361/white/0/status"
  7.     command_on_template: >
  8.       {"turn": "on"
  9.       {%- if brightness is defined -%}
  10.       , "brightness": {{brightness | float | multiply(0.3922) | round(0)}}
  11.       {%- endif -%}
  12.       }
  13.     state_template: '{%- if value_json.ison %}on{% else %}off{% endif %}'
  14.     brightness_template: '{{ value_json.brightness | float | multiply(2.55) | round(0) }}'
  15.     command_off_template: '{"turn":"off"}'
  16.     qos: 1
  17.  
  18.   - platform: mqtt
  19.     schema: template
  20.     name: Test Light CW
  21.     command_topic: "shellies/shellyrgbw2-2B8361/white/1/set"
  22.     state_topic: "shellies/shellyrgbw2-2B8361/white/1/status"
  23.     command_on_template: >
  24.       {"turn": "on"
  25.       {%- if brightness is defined -%}
  26.       , "brightness": {{brightness | float | multiply(0.3922) | round(0)}}
  27.       {%- endif -%}
  28.       }
  29.     state_template: '{%- if value_json.ison %}on{% else %}off{% endif %}'
  30.     brightness_template: '{{ value_json.brightness | float | multiply(2.55) | round(0) }}'
  31.     command_off_template: '{"turn":"off"}'
  32.     qos: 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement