Classes | |
| class | EnergyPreferencesValidation |
| class | ValidationIssue |
| class | ValidationIssues |
Functions | |
| None | _async_validate_auto_generated_cost_entity (HomeAssistant hass, str energy_entity_id, ValidationIssues issues) |
| None | _async_validate_cost_stat (HomeAssistant hass, dict[str, tuple[int, recorder.models.StatisticMetaData]] metadata, str stat_id, ValidationIssues issues) |
| None | _async_validate_price_entity (HomeAssistant hass, str entity_id, ValidationIssues issues, tuple[str,...] allowed_units, str unit_error) |
| None | _async_validate_usage_stat (HomeAssistant hass, dict[str, tuple[int, recorder.models.StatisticMetaData]] metadata, str stat_id, Sequence[str] allowed_device_classes, Mapping[str, Sequence[str]] allowed_units, str unit_error, ValidationIssues issues) |
| dict[str, str]|None | _get_placeholders (HomeAssistant hass, str issue_type) |
| EnergyPreferencesValidation | async_validate (HomeAssistant hass) |
Variables | |
| string | ENERGY_PRICE_UNIT_ERROR = "entity_unexpected_unit_energy_price" |
| ENERGY_PRICE_UNITS | |
| string | ENERGY_UNIT_ERROR = "entity_unexpected_unit_energy" |
| tuple | ENERGY_USAGE_DEVICE_CLASSES = (sensor.SensorDeviceClass.ENERGY,) |
| string | GAS_PRICE_UNIT_ERROR = "entity_unexpected_unit_gas_price" |
| GAS_PRICE_UNITS | |
| string | GAS_UNIT_ERROR = "entity_unexpected_unit_gas" |
| tuple | GAS_USAGE_DEVICE_CLASSES |
| string | WATER_PRICE_UNIT_ERROR = "entity_unexpected_unit_water_price" |
| WATER_PRICE_UNITS | |
| string | WATER_UNIT_ERROR = "entity_unexpected_unit_water" |
| tuple | WATER_USAGE_DEVICE_CLASSES = (sensor.SensorDeviceClass.WATER,) |
Validate the energy preferences provide valid data.
|
private |
Validate that the auto generated cost entity is correct.
Definition at line 305 of file validate.py.
|
private |
Validate that the cost stat is correct.
Definition at line 265 of file validate.py.
|
private |
Validate that the price entity is correct.
Definition at line 240 of file validate.py.
|
private |
Validate a statistic.
Definition at line 168 of file validate.py.
|
private |
Definition at line 77 of file validate.py.
| EnergyPreferencesValidation homeassistant.components.energy.validate.async_validate | ( | HomeAssistant | hass | ) |
Validate the energy configuration.
Definition at line 318 of file validate.py.
| string homeassistant.components.energy.validate.ENERGY_PRICE_UNIT_ERROR = "entity_unexpected_unit_energy_price" |
Definition at line 36 of file validate.py.
| homeassistant.components.energy.validate.ENERGY_PRICE_UNITS |
Definition at line 32 of file validate.py.
| string homeassistant.components.energy.validate.ENERGY_UNIT_ERROR = "entity_unexpected_unit_energy" |
Definition at line 35 of file validate.py.
| tuple homeassistant.components.energy.validate.ENERGY_USAGE_DEVICE_CLASSES = (sensor.SensorDeviceClass.ENERGY,) |
Definition at line 22 of file validate.py.
| string homeassistant.components.energy.validate.GAS_PRICE_UNIT_ERROR = "entity_unexpected_unit_gas_price" |
Definition at line 59 of file validate.py.
| homeassistant.components.energy.validate.GAS_PRICE_UNITS |
Definition at line 55 of file validate.py.
| string homeassistant.components.energy.validate.GAS_UNIT_ERROR = "entity_unexpected_unit_gas" |
Definition at line 58 of file validate.py.
| tuple homeassistant.components.energy.validate.GAS_USAGE_DEVICE_CLASSES |
Definition at line 37 of file validate.py.
| string homeassistant.components.energy.validate.WATER_PRICE_UNIT_ERROR = "entity_unexpected_unit_water_price" |
Definition at line 74 of file validate.py.
| homeassistant.components.energy.validate.WATER_PRICE_UNITS |
Definition at line 70 of file validate.py.
| string homeassistant.components.energy.validate.WATER_UNIT_ERROR = "entity_unexpected_unit_water" |
Definition at line 73 of file validate.py.
| tuple homeassistant.components.energy.validate.WATER_USAGE_DEVICE_CLASSES = (sensor.SensorDeviceClass.WATER,) |
Definition at line 60 of file validate.py.