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 |
---|---|---|---|---|
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 | |
create_energy_sensor | boolean | Optional | Set to disable/enable energy sensor creation. When set this will override global setting create_energy_sensors |
|
create_group | string | Optional | This setting is only applicable when you also use entities setting or include . Define a group name here. See [group(/sensor-types/group.md) |
|
create_utility_meters | boolean | Optional | Set to disable/enable utility meter creation. When set this will override global setting create_utility_meters . See utility meter |
|
custom_model_directory | string | Optional | Directory for a custom light model. Relative from the config directory |
|
disable_standby_power | boolean | Optional | Set to true to not show any power consumption when the device is standby |
|
energy_integration_method | string | Optional | Integration method for the energy sensor. See HA docs | |
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_sensor_naming . Also see naming. |
|
energy_sensor_id | string | Optional | Entity id of an existing energy sensor. Mostly used in conjunction with power_sensor_id . |
|
energy_sensor_unit_prefix | string | Optional | Unit prefix for the energy sensor. See HA docs. Set to none for to create a Wh sensor |
|
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 | |
entity_id | string | Required | HA entity ID. The id of the device you want your power sensor for | |
fixed | object | Optional | Fixed strategy options | |
force_calculate_group_energy | boolean | Optional | Set this to true when you want to create a Riemann sum sensor for powercalc group. By default the group energy sensor sums all individual energy sensors from member entities. |
|
force_energy_sensor_creation | boolean | Optional | Set this to true when you want a new energy sensor to be created for the power sensor with power_sensor_id , even if the device already has an energy sensor entity of its own. |
|
hide_members | boolean | Optional | Hide all group members in HA GUI, only applicable when create_group is also defined. |
|
ignore_unavailable_state | boolean | Optional | Set this to true when you want the power sensor to display a value (unavailable_power , standby_power or 0) regardless of whether the source entity is available. The can be useful for example on a TV which state can become unavailable when it is set to off. |
|
include | object | Optional | Use this in combination with create_group to automatically include entities from a certain area, group or template. See include entities |
|
linear | object | Optional | Linear strategy options | |
manufacturer | string | Optional | Manufacturer, most of the time this can be automatically discovered | |
mode | string | Optional | Calculation mode, one of lut , linear , fixed . The default mode is lut |
|
model | string | Optional | Model id, most of the time this can be automatically discovered | |
multiply_factor | float | Optional | Multiplies the calculated power by this number. Seemultiply-factor |
|
multiply_factor_standby | boolean | Optional | When set to true the multiply_factor will also be applied to the standby power |
|
name | string | Optional | Override the name | |
power_sensor_category | string | Optional | Category for the created power sensor. See HA docs. | |
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. | |
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 power_sensor_naming . Also see naming. |
|
sleep_power | object | Optional | Changes the power to some value x seconds after the device has turned off. See standby power. | |
standby_power | float | Optional | Supply the wattage when the device is off. See standby power. Can also be a template | |
unavailable_power | float | Optional | Supply the wattage when the device has unavailable state. When not specified standby_power will be used, or 0. |
|
utility_meter_net_consumption | boolean | Optional | Enable this if you would like to treat the source as a net meter. This will allow your counter to go both positive and negative. See utility_net_consumption. | |
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. | |
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_types |
|
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 | |
wled | object | Optional | WLED strategy options |