Update pvoutput.py (#4557)

This addition could be usefull when working with the template sensor using the data of this sensor.
This commit is contained in:
Marcel030nl 2016-11-24 09:58:38 +01:00 committed by Fabian Affolter
parent b1b8715f7d
commit f1d11e77ed

View File

@ -98,6 +98,7 @@ class PvoutputSensor(Entity):
"""Return the state attributes of the Pi-Hole."""
if self.pvcoutput is not None:
return {
ATTR_ENERGY_GENERATION: self.pvcoutput.energy_generation,
ATTR_POWER_GENERATION: self.pvcoutput.power_generation,
ATTR_ENERGY_CONSUMPTION: self.pvcoutput.energy_consumption,
ATTR_POWER_CONSUMPTION: self.pvcoutput.power_consumption,