Advertisement
tiwing

hot tub amps and watts yaml

Mar 21st, 2024
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.62 KB | None | 0 0
  1. - sensor:
  2.     - name: "Hot Tub Watts"
  3.       unique_id: hot_tub_watts
  4.       unit_of_measurement: "W"
  5.       state: >
  6.          {% set AmpA = states('sensor.hot_tub_current_a')|float(0) %}
  7.           {% set AmpB = states('sensor.hot_tub_current_b')|float(0) %}
  8.           {% set W = (AmpA + AmpB) * 120 %}
  9.           {{W|round(2)}}
  10.  
  11.   - sensor:
  12.     - name: "Hot Tub Amps"
  13.       unique_id: hot_tub_amps
  14.       unit_of_measurement: "A"
  15.       state: >
  16.          {% set AmpA = states('sensor.hot_tub_current_a')|float(0) %}
  17.           {% set AmpB = states('sensor.hot_tub_current_b')|float(0) %}
  18.           {{ max(AmpA,AmpB) }}
Tags: current yaml AMP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement