Created
August 8, 2021 15:25
-
-
Save LanceMcCarthy/b1cd52e0fbfa7013e0e8d067c54db7a0 to your computer and use it in GitHub Desktop.
Tesla Powerwall Energy Sensor Template for HomeAssistant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This template reports three values to Home Assistant through: grid_import, grid_export and solar_production sensors | |
- platform: template | |
sensors: | |
grid_import: | |
value_template: "{{state_attr('sensor.powerwall_site_now', 'energy_exported_(in_kW)')}}" | |
unit_of_measurement: kWh | |
device_class: energy | |
attribute_templates: | |
last_reset: "1970-01-01T00:00:00+00:00" | |
state_class: "measurement" | |
grid_export: | |
value_template: "{{state_attr('sensor.powerwall_load_now', 'energy_imported_(in_kW)')}}" | |
unit_of_measurement: kWh | |
device_class: energy | |
attribute_templates: | |
last_reset: "1970-01-01T00:00:00+00:00" | |
state_class: "measurement" | |
solar_production: | |
value_template: "{{state_attr('sensor.powerwall_solar_now', 'energy_exported_(in_kW)')}}" | |
unit_of_measurement: kWh | |
device_class: energy | |
attribute_templates: | |
last_reset: "1970-01-01T00:00:00+00:00" | |
state_class: "measurement" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment