Advertisement
dale3h

[Home Assistant] MiLight Color Selector (Long Work-around)

Jun 24th, 2016
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.51 KB | None | 0 0
  1. ################################################################
  2. ## MiLight Color Selector (Long Work-around)
  3. ## See http://www.tayloredmktg.com/rgb/ for more RGB values
  4. ################################################################
  5.  
  6. input_select:
  7.   milight_color:
  8.     name: MiLight Color
  9.     initial: White
  10.     icon: mdi:lightbulb
  11.     options:
  12.      - White
  13.       - Red
  14.       - Orange
  15.       - Yellow
  16.       - Green
  17.       - Blue
  18.       - Indigo
  19.       - Violet
  20.  
  21. automation:
  22.   - trigger:
  23.       platform: state
  24.       entity_id: input_select.milight_color
  25.       to: 'White'
  26.     action:
  27.       service: light.turn_on
  28.       data:
  29.         entity_id: light.your_light_here
  30.         brightness: 255
  31.         rgb_color: [255, 255, 255]
  32.  
  33.   - trigger:
  34.       platform: state
  35.       entity_id: input_select.milight_color
  36.       to: 'Red'
  37.     action:
  38.       service: light.turn_on
  39.       data:
  40.         entity_id: light.your_light_here
  41.         brightness: 255
  42.         rgb_color: [255, 0, 0]
  43.  
  44.   - trigger:
  45.       platform: state
  46.       entity_id: input_select.milight_color
  47.       to: 'Orange'
  48.     action:
  49.       service: light.turn_on
  50.       data:
  51.         entity_id: light.your_light_here
  52.         brightness: 255
  53.         rgb_color: [255, 165, 0]
  54.  
  55.   - trigger:
  56.       platform: state
  57.       entity_id: input_select.milight_color
  58.       to: 'Yellow'
  59.     action:
  60.       service: light.turn_on
  61.       data:
  62.         entity_id: light.your_light_here
  63.         brightness: 255
  64.         rgb_color: [255, 255, 0]
  65.  
  66.   - trigger:
  67.       platform: state
  68.       entity_id: input_select.milight_color
  69.       to: 'Green'
  70.     action:
  71.       service: light.turn_on
  72.       data:
  73.         entity_id: light.your_light_here
  74.         brightness: 255
  75.         rgb_color: [0, 255, 0]
  76.  
  77.   - trigger:
  78.       platform: state
  79.       entity_id: input_select.milight_color
  80.       to: 'Blue'
  81.     action:
  82.       service: light.turn_on
  83.       data:
  84.         entity_id: light.your_light_here
  85.         brightness: 255
  86.         rgb_color: [0, 0, 255]
  87.  
  88.   - trigger:
  89.       platform: state
  90.       entity_id: input_select.milight_color
  91.       to: 'Indigo'
  92.     action:
  93.       service: light.turn_on
  94.       data:
  95.         entity_id: light.your_light_here
  96.         brightness: 255
  97.         rgb_color: [75, 0, 130]
  98.  
  99.   - trigger:
  100.       platform: state
  101.       entity_id: input_select.milight_color
  102.       to: 'Violet'
  103.     action:
  104.       service: light.turn_on
  105.       data:
  106.         entity_id: light.your_light_here
  107.         brightness: 255
  108.         rgb_color: [238, 130, 238]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement