Browse Source

Updated example.yaml with new preset support example.

pull/9/head
Maurice Makaay 3 years ago
parent
commit
1a36b62c80
1 changed files with 21 additions and 12 deletions
  1. +21
    -12
      doc/example.yaml

+ 21
- 12
doc/example.yaml View File

@ -94,18 +94,26 @@ light:
name: "Fast Random" name: "Fast Random"
transition_length: 3s transition_length: 3s
update_interval: 3s update_interval: 3s
# You can define one or more groups of presets. These presets can
# be activated using various "preset.activate" action options.
# The presets can for example be used to mimic the behavior of the
# original firmware (tapping the color button = go to next preset,
# holding the color button = switch between RGB and white light mode).
# These bindings have been setup below, using the binary_sensor for
# the color button.
presets: presets:
- rgb:
- red_bright: { red: 100% }
- green: { green: 100% }
- blue_dimmed: { blue: 100% }
- yellow: { red: 100%, green: 100% }
- purple: { red: 100%, blue: 100% }
- white:
- cold: { color_temperature: 153 }
- chilly: { color_temperature: 275 }
- luke: { color_temperature: 400 }
- warm: { color_temperature: 587 }
rgb:
red: { red: 100%, green: 0%, blue: 0% }
green: { red: 0%, green: 100%, blue: 0% }
blue: { red: 0%, green: 0%, blue: 100% }
yellow: { red: 100%, green: 100%, blue: 0% }
purple: { red: 100%, green: 0%, blue: 100% }
randomize: { effect: Fast Random }
white:
cold: { color_temperature: 153 mireds }
chilly: { color_temperature: 275 mireds }
luke: { color_temperature: 400 mireds }
warm: { color_temperature: 588 mireds }
# This text sensor propagates the currently active light mode. # This text sensor propagates the currently active light mode.
# The possible light modes are: "off", "rgb", "white" and "night". # The possible light modes are: "off", "rgb", "white" and "night".
@ -147,7 +155,8 @@ binary_sensor:
blue: 1 blue: 1
brightness: 0.01 brightness: 0.01
# When touching the color button, set a random color.
# When touching the color button, acivate the next preset.
# When holding the color button, activate the next preset group.
- platform: xiaomi_bslamp2 - platform: xiaomi_bslamp2
id: ${id_color_button} id: ${id_color_button}
part: color button part: color button


Loading…
Cancel
Save