diff --git a/homeassistant/components/pvoutput/const.py b/homeassistant/components/pvoutput/const.py index 084ff809b27..f01d10fd13d 100644 --- a/homeassistant/components/pvoutput/const.py +++ b/homeassistant/components/pvoutput/const.py @@ -14,10 +14,4 @@ LOGGER = logging.getLogger(__package__) SCAN_INTERVAL = timedelta(minutes=2) -ATTR_ENERGY_GENERATION = "energy_generation" -ATTR_POWER_GENERATION = "power_generation" -ATTR_ENERGY_CONSUMPTION = "energy_consumption" -ATTR_POWER_CONSUMPTION = "power_consumption" -ATTR_EFFICIENCY = "efficiency" - CONF_SYSTEM_ID = "system_id" diff --git a/homeassistant/components/pvoutput/sensor.py b/homeassistant/components/pvoutput/sensor.py index de108329c45..7bd4b8789eb 100644 --- a/homeassistant/components/pvoutput/sensor.py +++ b/homeassistant/components/pvoutput/sensor.py @@ -14,8 +14,6 @@ from homeassistant.components.sensor import ( ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( - ATTR_TEMPERATURE, - ATTR_VOLTAGE, ELECTRIC_POTENTIAL_VOLT, ENERGY_KILO_WATT_HOUR, ENERGY_WATT_HOUR, @@ -28,15 +26,7 @@ from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.update_coordinator import CoordinatorEntity -from .const import ( - ATTR_EFFICIENCY, - ATTR_ENERGY_CONSUMPTION, - ATTR_ENERGY_GENERATION, - ATTR_POWER_CONSUMPTION, - ATTR_POWER_GENERATION, - CONF_SYSTEM_ID, - DOMAIN, -) +from .const import CONF_SYSTEM_ID, DOMAIN from .coordinator import PVOutputDataUpdateCoordinator @@ -164,21 +154,3 @@ class PVOutputSensorEntity( def native_value(self) -> int | float | None: """Return the state of the device.""" return self.entity_description.value_fn(self.coordinator.data) - - @property - def extra_state_attributes(self) -> dict[str, int | float | None] | None: - """Return the state attributes of the monitored installation.""" - - # Only add attributes to the original sensor - if self.entity_description.key != "energy_generation": - return None - - return { - ATTR_ENERGY_GENERATION: self.coordinator.data.energy_generation, - ATTR_POWER_GENERATION: self.coordinator.data.power_generation, - ATTR_ENERGY_CONSUMPTION: self.coordinator.data.energy_consumption, - ATTR_POWER_CONSUMPTION: self.coordinator.data.power_consumption, - ATTR_EFFICIENCY: self.coordinator.data.normalized_output, - ATTR_TEMPERATURE: self.coordinator.data.temperature, - ATTR_VOLTAGE: self.coordinator.data.voltage, - }