Guest User

Untitled

a guest
Jul 24th, 2023
1,442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. alias: "!Background - Kitchen Brightness + Max/100 Setting"
  2. description: ""
  3. trigger:
  4. - platform: state
  5. entity_id:
  6. - input_number.kitchen_rgb_brightness
  7. from: null
  8. to: null
  9. alias: When Helper, Kitchen RGB Brightness value has changed
  10. - platform: state
  11. entity_id:
  12. - input_boolean.kitchen_rgb_toggle
  13. from: null
  14. to: null
  15. alias: When Kitchen RGB Toggle has changed
  16. - platform: state
  17. entity_id:
  18. - input_boolean.toggle_kitchen_rgb_100
  19. from: null
  20. to: null
  21. - platform: state
  22. entity_id:
  23. - input_boolean.toggle_kitchen_rgb_top
  24. from: null
  25. to: null
  26. - platform: state
  27. entity_id:
  28. - input_boolean.toggle_kitchen_rgb_bottom
  29. from: null
  30. to: null
  31. condition: []
  32. action:
  33. - delay:
  34. hours: 0
  35. minutes: 0
  36. seconds: 0
  37. milliseconds: 600
  38. - if:
  39. - condition: state
  40. entity_id: input_boolean.toggle_kitchen_rgb_100
  41. state: "off"
  42. then:
  43. - if:
  44. - condition: state
  45. entity_id: input_boolean.kitchen_rgb_toggle
  46. state: "on"
  47. then:
  48. - if:
  49. - condition: state
  50. entity_id: input_boolean.toggle_kitchen_rgb_top
  51. state: "on"
  52. then:
  53. - service: light.turn_on
  54. data:
  55. brightness: "{{ states('input_number.kitchen_rgb_brightness') }}"
  56. target:
  57. entity_id: light.kitchen_rgb_top_light
  58. alias: Call Service - Read Helper value, change top RGB light value
  59. alias: IF Top Toggle ON, read Helper value, change light value
  60. - if:
  61. - condition: state
  62. entity_id: input_boolean.toggle_kitchen_rgb_bottom
  63. state: "on"
  64. then:
  65. - service: light.turn_on
  66. data:
  67. brightness: "{{ states('input_number.kitchen_rgb_brightness') }}"
  68. target:
  69. entity_id: light.kitchen_rgb_bottom_light
  70. alias: >-
  71. Call Service - Read Helper value, change bottom RGB light
  72. value
  73. alias: IF Bottom Toggle ON, read Helper value, change light value
  74. alias: >-
  75. IF RGB Toggle is ON, read brightness value, check TOP/BOT toggle,
  76. change light values
  77. else:
  78. - service: light.turn_off
  79. data:
  80. transition: 3
  81. target:
  82. entity_id:
  83. - light.kitchen_rgb_top_light
  84. - light.kitchen_rgb_bottom_light
  85. alias: Make sure Max/100 Toggle is OFF
  86. else:
  87. - if:
  88. - condition: state
  89. entity_id: input_boolean.toggle_kitchen_rgb_100
  90. state: "on"
  91. then:
  92. - service: light.turn_on
  93. data:
  94. transition: 2
  95. kelvin: 6500
  96. brightness: 255
  97. target:
  98. entity_id:
  99. - light.kitchen_rgb_top_light
  100. - light.kitchen_rgb_bottom_light
  101. mode: single
  102.  
Advertisement
Add Comment
Please, Sign In to add comment