Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- globals:
- - id: current_effect
- type: int
- initial_value: "0"
- switch:
- - platform: template
- name: "Remote led lights"
- lambda: 'return id(current_effect) == 1;'
- id: remote_lights
- turn_on_action:
- - lambda: 'id(current_effect) = 1;'
- - logger.log: "Leds turned on"
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0xC13E
- turn_off_action:
- - logger.log: "Leds turned off"
- - lambda: 'id(current_effect) = 0;'
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x41BE
- - platform: template
- name: "Red leds"
- id: redleds
- lambda: 'return id(current_effect) == 2;'
- turn_on_action:
- - lambda: 'id(current_effect) = 2;'
- - logger.log: "Leds turned red"
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x21DE
- - platform: template
- name: "Fade effect"
- id: fade
- lambda: 'return id(current_effect) == 3;'
- turn_on_action:
- - lambda: 'id(current_effect) = 3;'
- - logger.log: "Fade effect turned on"
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0xC936
- - platform: template
- name: "Smooth effect"
- id: smooth
- lambda: 'return id(current_effect) == 4;'
- turn_on_action:
- - lambda: 'id(current_effect) = 4;'
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0xE916
- - platform: template
- name: "green leds"
- id: greenledslambda
- lambda: 'return id(current_effect) == 5;'
- turn_on_action:
- - lambda: 'id(current_effect) = 5;'
- - logger.log: "Leds turned green"
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0xA15E
- - platform: template
- name: "blue leds"
- id: blueleds
- lambda: 'return id(current_effect) == 6;'
- turn_on_action:
- - lambda: 'id(current_effect) = 6;'
- - logger.log: "Leds turned blue"
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x619E
- - platform: template
- name: "white leds"
- id: whiteleds
- lambda: 'return id(current_effect) == 7;'
- turn_on_action:
- - lambda: 'id(current_effect) = 7;'
- - logger.log: "Leds turned white"
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0xE11E
- - platform: template
- optimistic: true
- name: "Brightness up"
- id: brUp
- turn_on_action:
- - switch.turn_off: brDown
- - logger.log: "Brightness turned up"
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x01FE
- - delay: 0.5s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x01FE
- - delay: 0.5s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x01FE
- - switch.turn_off: brUp
- - platform: template
- optimistic: true
- name: "Brightness down"
- id: brDown
- turn_on_action:
- - switch.turn_off: brUp
- - logger.log: "Brightness turned down"
- - switch.turn_on: remote_lights
- - delay: 1s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x817E
- - delay: 0.5s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x817E
- - delay: 0.5s
- - remote_transmitter.transmit_nec:
- address: 0x00FF
- command: 0x817E
- - switch.turn_off: brDown
Add Comment
Please, Sign In to add comment