daily pastebin goal
89%
SHARE
TWEET

HA sensors.yaml

a guest Mar 20th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - platform: template
  2.   sensors:
  3.  
  4.     stromforbruk_t:
  5.       friendly_name: 'Strømforbruk'
  6.       unit_of_measurement: "kr/t"
  7.       value_template: "{{'{0:,.2f}'.format(states('sensor.real_time_consumption_sagmesterveien_6')|float * states('sensor.electricity_price_sagmesterveien_6')|float / 1000 )}}"
  8.       icon_template: >-
  9.           {% if states.sensor.electricity_price_sagmesterveien_6.state|float < 0.5 %} mdi:coins
  10.           {% else %} mdi:cash
  11.           {% endif %}
  12.  
  13.     tibber_use:
  14.       friendly_name: 'Estimert forbruk'
  15.       unit_of_measurement: "kr/år"
  16.       value_template: "{{'{:,.2f}'.format(states.sensor.electricity_price_sagmesterveien_6.attributes["estimated_annual_consumption"])}}"
  17.  
  18.     tibber_min:
  19.       friendly_name: 'Strømpris lav'
  20.       unit_of_measurement: "kr/kWh"
  21.       value_template: "{{'{:.2f}'.format(states.sensor.electricity_price_sagmesterveien_6.attributes["min_price"])}}"
  22.  
  23.     tibber_max:
  24.       friendly_name: 'Strømpris høy'
  25.       unit_of_measurement: "kr/kWh"
  26.       value_template: "{{'{:.2f}'.format(states.sensor.electricity_price_sagmesterveien_6.attributes["max_price"])}}"
  27.  
  28.     tibber_avg:
  29.       friendly_name: 'Strømpris snitt'
  30.       unit_of_measurement: "kr/kWh"
  31.       value_template: "{{'%0.2f' % ((float(states.sensor.electricity_price_sagmesterveien_6.attributes["min_price"])+float(states.sensor.electricity_price_sagmesterveien_6.attributes["max_price"]))/2 )}}"
  32.  
  33.     tibber_volt:
  34.       friendly_name: 'Spenning'
  35.       unit_of_measurement: "V"
  36.       value_template: "{{states.sensor.real_time_consumption_sagmesterveien_6.attributes["voltagePhase1"]}}"
  37.  
  38.     tibber_amp:
  39.       friendly_name: 'Strømtrekk'
  40.       unit_of_measurement: "A"
  41.       value_template: "{{states.sensor.real_time_consumption_sagmesterveien_6.attributes["currentPhase1"]}}"
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