Sensor configuration
For each entity you want to create a virtual power sensor for you’ll need to add an entry in configuration.yaml or use the GUI config flow. Below you’ll find a listing of possible configuration parameters for each sensor. Not all configuration params listed below are available in the GUI, when you want to use the “advanced” options you need to use YAML configuration.
Note
When you define an option per sensor it will override any Global configuration option
Name |
Type |
Requirement |
Description |
GUI |
---|---|---|---|---|
entity_id |
string |
Required |
HA entity ID. The id of the device you want your power sensor for |
X |
unique_id |
string |
Optional |
Powercalc tries to get a unique_id from the source entity by default. When the source entity does not have a unique_id you can configure one yourself. This allows you to change the name, area etc from the GUI. You can use for example https://www.uuidgenerator.net/ to generate a unique one |
X |
manufacturer |
string |
Optional |
Manufacturer, most of the time this can be automatically discovered |
X |
model |
string |
Optional |
Model id, most of the time this can be automatically discovered |
X |
standby_power |
float |
Optional |
Supply the wattage when the device is off. See Standby power. Can also be a template |
X |
sleep_power |
object |
Optional |
Changes the power to some value x seconds after the device has turned off. See Standby power. |
|
unavailable_power |
float |
Optional |
Supply the wattage when the device has unavailable state. When not specified |
X |
disable_standby_power |
boolean |
Optional |
Set to |
|
name |
string |
Optional |
Override the name |
X |
create_energy_sensor |
boolean |
Optional |
Set to disable/enable energy sensor creation. When set this will override global setting |
X |
create_utility_meters |
boolean |
Optional |
Set to disable/enable utility meter creation. When set this will override global setting |
X |
utility_meter_types |
list |
Optional |
Define which cycles you want to create utility meters for. See utility_cycle. This will override global setting |
|
utility_meter_offset |
string |
Optional |
Define the offset for utility meters. See utility_offset. |
|
utility_meter_tariffs |
list |
Optional |
Define different tariffs. See utility_tariffs. |
x |
custom_model_directory |
string |
Optional |
Directory for a custom light model. Relative from the config directory |
|
power_sensor_category |
string |
Optional |
Category for the created power sensor. See HA docs. |
|
power_sensor_naming |
string |
Optional |
Change the name (and id) of the sensors. Use the {} placeholder for the entity name of your appliance. When set this will override global setting |
|
energy_sensor_category |
string |
Optional |
Category for the created energy sensor. See HA docs. |
|
energy_sensor_naming |
string |
Optional |
Change the name (and id) of the sensors. Use the {} placeholder for the entity name of your appliance. When set this will override global setting |
|
energy_integration_method |
string |
Optional |
Integration method for the energy sensor. See HA docs |
|
energy_sensor_unit_prefix |
string |
Optional |
Unit prefix for the energy sensor. See HA docs. Set to none for to create a Wh sensor |
|
mode |
string |
Optional |
Calculation mode, one of |
X |
float |
Optional |
Multiplies the calculated power by this number. See Multiply Factor |
X |
|
multiply_factor_standby |
boolean |
Optional |
When set to |
|
fixed |
object |
Optional |
X |
|
linear |
object |
Optional |
X |
|
wled |
object |
Optional |
X |
|
entities |
list |
Optional |
Makes it possible to add multiple entities at once in one powercalc entry. Also enable possibility to create group sensors automatically. See /group |
|
create_group |
string |
Optional |
This setting is only applicable when you also use |
|
hide_members |
boolean |
Optional |
Hide all group members in HA GUI, only applicable when |
X |
include |
object |
Optional |
Use this in combination with |
|
power_sensor_id |
string |
Optional |
Entity id of an existing power sensor. This can be used to let powercalc create energy sensors and utility meters. This will create no virtual power sensor. |
|
force_energy_sensor_creation |
boolean |
Optional |
Set this to |
|
force_calculate_group_energy |
boolean |
Optional |
Set this to |
|
energy_sensor_id |
string |
Optional |
Entity id of an existing energy sensor. Mostly used in conjunction with |
|
ignore_unavailable_state |
boolean |
Optional |
Set this to |
X |
calculation_enabled_condition |
template |
Optional |
The configured power calculation strategy will only be executed when this template results in True, otherwise the power sensor will display 0 |
X |