SHARE
TWEET

Untitled

a guest Mar 26th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fade_torchere:
  2.   alias: Fade Torchere lights
  3.   sequence:
  4.    # - condtion: state
  5.     #   entity_id: light.living_room_torchere_e27
  6.     #   state: 'on'
  7.     - condition: template
  8.       value_template: "{{ state_attr('light.living_room_torchere_e27','brightness') > 10 }}"
  9.     - service: light.turn_on
  10.       data_template:
  11.         entity_id: light.living_room_torchere_e27
  12.         brightness: >
  13.          {% set target = state_attr('light.living_room_torchere_e27','brightness') - 10 %}
  14.           {% if target < 10 %}
  15.             1    
  16.           {% else %}
  17.             {{ target }}
  18.           {% endif %}
  19.     - delay: 00:00:01
  20.     - service: script.fade_torchere_delay
  21.  
  22. fade_torchere_delay:
  23.   alias: Loop Fade Torchere
  24.   sequence:
  25.       - delay:
  26.           milliseconds: 1
  27.       - service: script.fade_torchere
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top