Update energy.markdown with a troubleshooting section for missing entities (#28298)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
karwosts 2023-09-26 01:39:29 -07:00 committed by GitHub
parent 1d2bbbf538
commit ad87935b89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,3 +21,22 @@ Home Assistant is an open platform and so home energy management is not restrict
If you have a sensor that returns instantaneous power readings (W or kW), then to add a sensor that returns energy usage or generation (kWh) refer to [Riemann sum integral integration](/integrations/integration/#energy)
<img src='/images/docs/energy/energy-overview.png' alt='Visual representation of how all different energy forms relate.' style='border: 0;box-shadow: none;'>
## Troubleshooting missing entities
### Condition
You are trying to add a sensor to the energy dashboard, but it does not appear in the selection list.
### Resolution
To find out why the sensor is not showing, check the following points:
- The sensor must have the appropriate attributes. Check your entity attributes in {% my developer_states title="**Developer Tools** > **States**" %} to confirm the following:
- `device_class` must be `energy` for electricity grid, solar, or battery categories. It must be `gas` for gas, or `water` for water.
- `state_class` must be `total` or `total_increasing`.
- The sensor must have an appropriate `unit_of_measurement`. See the help text for each category to see which units are accepted. Units containing an exponent must match superscript characters exactly as defined, e.g. `m³` is accepted, `m3` is not.
If any of the attributes are not correct, please open an issue against the integration that provides your sensor, or if you are developing custom template sensors, make sure the templates have the correct settings.
- The entity must be a `sensor`. If you are trying to add something from another domain (for example an `input_number`), then you must first create a template sensor from it.
- The entity must not have any statistics errors. Go to {% my developer_statistics title="**Developer Tools** > **Statistics**" %} to check your specific entity. If your unit has a listed issue here, you must fix the issue before it can be added to the dashboard.