custom_components/myenergi/sensor.py
def state(self):
        """Return the state of the sensor."""
        value = self.device.history_data.get(self.key, None)
        if value is None:
            return None
        return value
Return the state of the sensor.
Return the state of the sensor.
Return the state of the sensor .
def state(self):
        value = self.device.history_data.get(self.key, None)
        if value is None:
            return None
        return value
def state ( self ) : value = self . device . history_data . get ( self . key , None ) if value is None : return None return value
Return the state of the sensor.
Return the state of the sensor .
"""Return the state of the sensor."""
self