Advertisement
techwithshae

Hass.io Energy Monitor Config Options

Jan 28th, 2020
909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. #HASS CONFIG FILE
  2.  
  3. sensor:
  4.  
  5. #These 2 sensors read the data coming from the Arduino
  6.  
  7. - platform: mqtt
  8. name: "Energy Sensor L1"
  9. state_topic: "sensor/power/L1"
  10. unit_of_measurement: 'A'
  11. icon: mdi:power-plug
  12.  
  13. - platform: mqtt
  14. name: "Energy Sensor L2"
  15. state_topic: "sensor/power/L2"
  16. unit_of_measurement: 'A'
  17. icon: mdi:power-plug
  18.  
  19. #This template sensor combines the 2 above sensors to provide a total amperage usage
  20.  
  21. - platform: template
  22. sensors:
  23. total_power_usage:
  24. value_template: '{{ ((states.sensor.energy_sensor_l1.state | float) +
  25. (states.sensor.energy_sensor_l2.state | float)) | round(1) }}'
  26. friendly_name: 'Total Power Usage (A)'
  27. unit_of_measurement: 'A'
  28. icon_template: mdi:power-plug
  29.  
  30. #This template sensor calculates wattage from the total power usage in amps (above sensor)
  31.  
  32. - platform: template
  33. sensors:
  34. total_power_watt:
  35. friendly_name: "Total Power Usage (W)"
  36. unit_of_measurement: W'
  37. value_template: "{{ (states('sensor.total_power_usage')|float * 120) | round(1) }}"
  38. icon_template: mdi:power-plug
  39.  
  40. #This sensor provides a cumulative kWh value from the total wattage (above sensor)
  41.  
  42. - platform: integration
  43. source: sensor.total_power_watt
  44. name: energy_spent
  45. unit_prefix: k
  46. round: 2
  47.  
  48. #Utility Meter integration which pulls data from energy_spent (above sensor)
  49.  
  50. utility_meter:
  51. daily_energy:
  52. name: "Daily Power Usage"
  53. source: sensor.energy_spent
  54. cycle: daily
  55. monthly_energy:
  56. name: "Monthly Power Usage"
  57. source: sensor.energy_spent
  58. cycle: monthly
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement