How to simplify below code? I don’t want to create separate automation for each different color/brightness.
- id: '1582362294780'
alias: yeelight color change
description: ''
trigger:
- entity_id: input_select.yeelight_mode
platform: state
to: red
condition: []
action:
- data:
brightness: 1
rgb_color:
- 139
- 0
- 0
entity_id: light.yeelight
service: yeelight.set_color_scene
- id: '1582362994505'
alias: yeelight blue
description: ''
trigger:
- entity_id: input_select.yeelight_mode
platform: state
to: blue
condition: []
action:
- data:
brightness: 1
rgb_color:
- 30
- 144
- 255
entity_id: light.yeelight
service: yeelight.set_color_scene