cperryoh

Untitled

Jan 18th, 2021 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. globals:
  2. - id: current_effect
  3. type: int
  4. initial_value: "0"
  5. switch:
  6. - platform: template
  7. name: "Remote led lights"
  8. lambda: 'return id(current_effect) == 1;'
  9. id: remote_lights
  10. turn_on_action:
  11. - lambda: 'id(current_effect) = 1;'
  12. - logger.log: "Leds turned on"
  13. - remote_transmitter.transmit_nec:
  14. address: 0x00FF
  15. command: 0xC13E
  16. turn_off_action:
  17. - logger.log: "Leds turned off"
  18. - lambda: 'id(current_effect) = 0;'
  19. - remote_transmitter.transmit_nec:
  20. address: 0x00FF
  21. command: 0x41BE
  22. - platform: template
  23. name: "Red leds"
  24. id: redleds
  25. lambda: 'return id(current_effect) == 2;'
  26. turn_on_action:
  27. - lambda: 'id(current_effect) = 2;'
  28. - logger.log: "Leds turned red"
  29. - switch.turn_on: remote_lights
  30. - delay: 1s
  31. - remote_transmitter.transmit_nec:
  32. address: 0x00FF
  33. command: 0x21DE
  34. - platform: template
  35. name: "Fade effect"
  36. id: fade
  37. lambda: 'return id(current_effect) == 3;'
  38. turn_on_action:
  39. - lambda: 'id(current_effect) = 3;'
  40. - logger.log: "Fade effect turned on"
  41. - switch.turn_on: remote_lights
  42. - delay: 1s
  43. - remote_transmitter.transmit_nec:
  44. address: 0x00FF
  45. command: 0xC936
  46. - platform: template
  47. name: "Smooth effect"
  48. id: smooth
  49. lambda: 'return id(current_effect) == 4;'
  50. turn_on_action:
  51. - lambda: 'id(current_effect) = 4;'
  52. - switch.turn_on: remote_lights
  53. - delay: 1s
  54. - remote_transmitter.transmit_nec:
  55. address: 0x00FF
  56. command: 0xE916
  57. - platform: template
  58. name: "green leds"
  59. id: greenledslambda
  60. lambda: 'return id(current_effect) == 5;'
  61. turn_on_action:
  62. - lambda: 'id(current_effect) = 5;'
  63. - logger.log: "Leds turned green"
  64. - switch.turn_on: remote_lights
  65. - delay: 1s
  66. - remote_transmitter.transmit_nec:
  67. address: 0x00FF
  68. command: 0xA15E
  69. - platform: template
  70. name: "blue leds"
  71. id: blueleds
  72. lambda: 'return id(current_effect) == 6;'
  73. turn_on_action:
  74. - lambda: 'id(current_effect) = 6;'
  75. - logger.log: "Leds turned blue"
  76. - switch.turn_on: remote_lights
  77. - delay: 1s
  78. - remote_transmitter.transmit_nec:
  79. address: 0x00FF
  80. command: 0x619E
  81. - platform: template
  82. name: "white leds"
  83. id: whiteleds
  84. lambda: 'return id(current_effect) == 7;'
  85. turn_on_action:
  86. - lambda: 'id(current_effect) = 7;'
  87. - logger.log: "Leds turned white"
  88. - switch.turn_on: remote_lights
  89. - delay: 1s
  90. - remote_transmitter.transmit_nec:
  91. address: 0x00FF
  92. command: 0xE11E
  93. - platform: template
  94. optimistic: true
  95. name: "Brightness up"
  96. id: brUp
  97. turn_on_action:
  98. - switch.turn_off: brDown
  99. - logger.log: "Brightness turned up"
  100. - switch.turn_on: remote_lights
  101. - delay: 1s
  102. - remote_transmitter.transmit_nec:
  103. address: 0x00FF
  104. command: 0x01FE
  105. - delay: 0.5s
  106. - remote_transmitter.transmit_nec:
  107. address: 0x00FF
  108. command: 0x01FE
  109. - delay: 0.5s
  110.  
  111. - remote_transmitter.transmit_nec:
  112. address: 0x00FF
  113. command: 0x01FE
  114. - switch.turn_off: brUp
  115. - platform: template
  116. optimistic: true
  117. name: "Brightness down"
  118. id: brDown
  119. turn_on_action:
  120. - switch.turn_off: brUp
  121. - logger.log: "Brightness turned down"
  122. - switch.turn_on: remote_lights
  123. - delay: 1s
  124. - remote_transmitter.transmit_nec:
  125. address: 0x00FF
  126. command: 0x817E
  127. - delay: 0.5s
  128. - remote_transmitter.transmit_nec:
  129. address: 0x00FF
  130. command: 0x817E
  131. - delay: 0.5s
  132. - remote_transmitter.transmit_nec:
  133. address: 0x00FF
  134. command: 0x817E
  135. - switch.turn_off: brDown
Add Comment
Please, Sign In to add comment