Hi everyone, I wanted to share my recent experience integrating a custom energy sensor into Home Assistant. I’ve been using a Tasmota-based sensor to monitor high and low tariff energy consumption, and it’s been working great. However, getting it to show up on the Energy Dashboard was a bit of a challenge!
Initially, I set up the sensors with the correct device_class and state_class, but they still didn’t appear in the dropdown when configuring the Energy Dashboard. After some research, I realized that the data needs to be recorded properly by the Recorder component. I added some customizations to my customise.yaml file to ensure everything was correctly tagged.
Here’s what I learned:
- Customisation Setup: Make sure your sensors have the right
device_class,state_class, andtariffsdefined. This helps Home Assistant recognize them as energy sensors.
yaml
sensor.energy_high:
unit_of_measurement: ‘kWh’
device_class: energy
tariffs: [peak]
state_class: total_increasing
sensor.energy_low:
unit_of_measurement: ‘kWh’
device_class: energy
tariffs: [offpeak]
state_class: total_increasing
-
Recorder Integration: Ensure the Recorder component is properly configured to track your sensor data. Without this, the Energy Dashboard won’t have any data to display.
-
Testing and Verification: After making these changes, restart Home Assistant and check if your sensors appear in the Energy Dashboard settings. If they don’t, double-check your customisation file for any errors.
This setup has been working smoothly for me, and I’m now able to monitor my energy consumption in detail. If anyone else is struggling with similar issues, I’d be happy to help troubleshoot!
Happy automating! ![]()