I have many sensors from my solar systems and emporia energy monitors that work on my own dashboards but not on the main HA energy dashboard.
3 of these are calculations from other sensors as you can see in my yaml.config file
how do I make my sensors into energy sensors ? I think they need to have device_class: energy
and state_class: measurement
I am new to HA and would appreciate any help
here is my current yaml
I put the 3 backticks not sure why it did format like yaml?
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
ffmpeg:
sensor:
- platform: template
sensors:
gridtie_totalsolar:
friendly_name: "Grid Tie Solar Generation - Total"
value_template: "{{ states('sensor.sb6_0_1sp_us_41_511_grid_power') | float(0)+ states('sensor.grid_tie_input_2_1min') | float(0)}}"
unit_of_measurement: 'W'
gridtie_totalload:
friendly_name: "Grid Tie Total Load"
value_template: "{{ states('sensor.bunny_house_totalusage_1min') | float(0)+ states('sensor.grid_system_totalusage_1min') | float(0)}}"
unit_of_measurement: 'W'
gridtie_return_to_grid:
friendly_name: "Grid Tie Return to Grid"
value_template: "{{ states('sensor.gridtie_totalsolar') | float(0)- states('sensor.gridtie_totalload') | float(0)}}"
unit_of_measurement: 'W'