Advertisement
noam76

fnc

Mar 4th, 2019
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.62 KB | None | 0 0
  1. timer_on_hour:
  2.  value_template: '{{ states.input_number.timer_on_hours.state | int }}'
  3. timer_on_min:
  4.  value_template: '{{ states.input_number.timer_on_min.state | int }}'
  5.      
  6. fnct: >
  7. function(on_min_state) {
  8.   {%- if on_min_state|length == 1 -%}
  9.      0
  10.   {%- endif -%}
  11.     {{ on_min_state }}
  12.  }
  13.  
  14. timer_on_clock_start:
  15.  value_template: >-
  16.   {{ states.sensor.timer_on_hour.state }}:
  17.     f <-function() {
  18.      fuunction(timer_on_mint)
  19.     }
  20.  
  21.     }
  22. node2:
  23.   value: 6
  24.   # can be named if you prefer, though that will have no impact
  25.   fnct: >
  26.    DoCalculate <- function(node) {
  27.       node$value * 2
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement