Advertisement
Guest User

Untitled

a guest
Jan 6th, 2022
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. sensor:
  2. - platform: template
  3. grid_export: # Instant power export for energy dashboard - goes 0 if currently importing (uses Sense)
  4. friendly_name: "Grid Export"
  5. unit_of_measurement: 'W'
  6. value_template: >
  7. {% if (states('sensor.energy_usage') | int(0) - states('sensor.energy_production') | int(0)) > 0 %}
  8. 0
  9. {% else -%}
  10. {{ (states('sensor.energy_usage') | int(0) - states('sensor.energy_production') | int(0)) | abs }}
  11. {% endif %}
  12. grid_import: # Instant power import for energy dashboard - goes 0 if currently exporting (uses Sense)
  13. friendly_name: "Grid Import"
  14. unit_of_measurement: 'W'
  15. value_template: >
  16. {% if (states('sensor.energy_usage') | int(0) - states('sensor.energy_production') | int(0)) > 0 %}
  17. {{ (states('sensor.energy_usage') | int(0) - states('sensor.energy_production') | int(0)) }}
  18. {% else -%}
  19. 0
  20. {% endif %}
  21.  
  22.  
  23. - platform: integration # Grid energy import for Energy dashboard - from forum
  24. source: sensor.grid_import
  25. name: grid_import_kwh
  26. unit_prefix: k
  27. round: 2
  28. - platform: integration # Grid energy export for Energy dashboard - from forum
  29. source: sensor.grid_export
  30. name: grid_export_kwh
  31. unit_prefix: k
  32. round: 2
  33.  
  34. - platform: integration # experimental energy build up for AC costs
  35. source: sensor.ac_usage
  36. name: ac_usage_kwh
  37. unit_prefix: k
  38. round: 2
  39. - platform: integration # experimental energy build up for hot water heater costs
  40. source: sensor.water_heater_usage
  41. name: water_heater_usage_kwh
  42. unit_prefix: k
  43. round: 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement