'Get the latest data, update state.'

def update(self):

    self.update_sensor()
    if (self._sensor_type == ACTIVE_TYPE):
        self._state = self._data.active_power
    elif (self._sensor_type == DAILY_TYPE):
        self._state = self._data.daily_usage
